public void logWarning(String warning, Throwable exception) { XMLCorePlugin.getDefault().getLog().log(new Status(IStatus.WARNING, XMLCorePlugin.getDefault().getBundle().getSymbolicName(), IStatus.WARNING, warning, exception)); } }
private void retrieveCatalog() { if (systemCatalog != null) return; ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog(); INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs(); for (int i = 0; i < nextCatalogs.length; i++) { INextCatalog catalog = nextCatalogs[i]; ICatalog referencedCatalog = catalog.getReferencedCatalog(); if (referencedCatalog != null) { if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) { systemCatalog = referencedCatalog; } } } }
public void logError(String error, Throwable exception) { XMLCorePlugin.getDefault().getLog().log(new Status(IStatus.ERROR, XMLCorePlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, error, exception)); }
public XMLCatalogPreferencePage() { defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog(); INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs(); for (int i = 0; i < nextCatalogs.length; i++) { INextCatalog catalog = nextCatalogs[i]; ICatalog referencedCatalog = catalog.getReferencedCatalog(); if (referencedCatalog != null) { if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) { systemCatalog = referencedCatalog; } else if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) { userCatalog = referencedCatalog; } } } }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Control createDialogArea(Composite parent) { Composite dialogArea = (Composite) super.createDialogArea(parent); PlatformUI.getWorkbench().getHelpSystem().setHelp(dialogArea, XMLCommonUIContextIds.XCUI_CATALOG_DIALOG); ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog(); panel = new SelectXMLCatalogIdPanel(dialogArea, xmlCatalog); ISelectionChangedListener listener = new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { updateButtonState(); } }; panel.getTableViewer().setFilterExtensions(extensions); panel.getTableViewer().addSelectionChangedListener(listener); return dialogArea; }
protected void doSavePreferenceStore() { XMLCorePlugin.getDefault().savePluginPreferences(); // model }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
protected Preferences getModelPreferences() { return XMLCorePlugin.getDefault().getPluginPreferences(); }
private static ProcessingInstruction getXMLDeclaration(Document document) { Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences(); String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); if (charSet == null || charSet.trim().equals("")) { charSet = "UTF-8"; } ProcessingInstruction xmlDeclaration = document.createProcessingInstruction(XML, "version=\"1.0\" encoding=\"" + charSet + "\""); return xmlDeclaration; }
/** * read from plugin registry and parse it. */ protected void readRegistry() { IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry(); IExtensionPoint point = pluginRegistry.getExtensionPoint(XMLCorePlugin.getDefault().getBundle().getSymbolicName(), EXTENSION_POINT_ID); if (point != null) { IConfigurationElement[] elements = point.getConfigurationElements(); for (int i = 0; i < elements.length; i++) { readElement(elements[i]); } } }
private String getUserPreferredCharset() { Preferences preference = XMLCorePlugin.getDefault().getPluginPreferences(); String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); return charSet; }
protected String resolve(TemplateContext context) { return XMLCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET); } }
/** * Returns indentation width if using spaces for indentation, -1 otherwise * * @return int */ private int getIndentationWidth() { int width = -1; Preferences preferences = XMLCorePlugin.getDefault().getPluginPreferences(); if (XMLCorePreferenceNames.SPACE.equals(preferences.getString(XMLCorePreferenceNames.INDENTATION_CHAR))) { width = preferences.getInt(XMLCorePreferenceNames.INDENTATION_SIZE); } return width; } }
/** * Set any preferences for XML validation. * * @see org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator#setupValidation(org.eclipse.wst.xml.core.internal.validation.core.NestedValidatorContext) */ protected void setupValidation(NestedValidatorContext context) { super.setupValidation(context); warnNoGrammar = XMLCorePlugin.getDefault().getPluginPreferences().getBoolean(XMLCorePreferenceNames.WARN_NO_GRAMMAR); }
protected void doSavePreferenceStore() { XMLUIPlugin.getDefault().savePluginPreferences(); // editor XMLCorePlugin.getDefault().savePluginPreferences(); // model }