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; } } } }
public SelectFromCatalogDialog(Shell parentShell) { super(parentShell); 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; } } } }
ICatalog referencedCatalog = catalog.getReferencedCatalog(); if (referencedCatalog != null) { if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) { ICatalog systemCatalog = referencedCatalog; addXMLCatalogEntries(result, systemCatalog.getCatalogEntries()); else if (XMLCorePlugin.USER_CATALOG_ID.equals(referencedCatalog.getId())) { ICatalog userCatalog = referencedCatalog; addXMLCatalogEntries(result, userCatalog.getCatalogEntries());
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; } } } }
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; } } } }
protected Control createDialogArea(Composite parent) { Composite dialogArea = (Composite) super.createDialogArea(parent); addNamespacesControl = new CommonAddNamespacesControl(dialogArea, SWT.NONE, resourceLocation); List list = new ArrayList(); addBuiltInNamespaces(list); 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.USER_CATALOG_ID.equals(referencedCatalog.getId())) { ICatalog userCatalog = referencedCatalog; addCatalogMapToList(userCatalog, list); } else if (XMLCorePlugin.SYSTEM_CATALOG_ID.equals(referencedCatalog.getId())) { ICatalog systemCatalog = referencedCatalog; addCatalogMapToList(systemCatalog, list); } } } computeAddablePrefixes(list, existingNamespaces); addNamespacesControl.setNamespaceInfoList(list); return dialogArea; }