public String getNamespaceIdentifier() { return extension.getNamespaceIdentifier(); }
public int compare(Object arg0, Object arg1) { String s1 = ((IExtension) arg0).getNamespaceIdentifier(); String s2 = ((IExtension) arg1).getNamespaceIdentifier(); return s1.compareToIgnoreCase(s2); } };
public boolean compare(Object extension1, Object extension2) { String s1 = ((IExtension) extension1).getNamespaceIdentifier(); String s2 = ((IExtension) extension2).getNamespaceIdentifier(); //Return true if elementTwo is 'greater than' elementOne return s2.compareToIgnoreCase(s1) > 0; } };
public String getNamespaceIdentifier() { // namespace name is determined by the contributing extension return getDeclaringExtension().getNamespaceIdentifier(); }
@Override public String getNamespaceIdentifier() { // namespace name is determined by the contributing extension return getDeclaringExtension().getNamespaceIdentifier(); }
public String getNamespaceIdentifier() { // namespace name is determined by the contributing extension return getDeclaringExtension().getNamespaceIdentifier(); }
/** * @return the declaring namespace. */ public String getNamespace() { return configElement.getDeclaringExtension().getNamespaceIdentifier(); }
/** * Obtains the ID of the specified extension, * or the defining plug-in ID if the extension has none. * * @param extension an extension * @return an identifier for the extension */ private String getExtensionID(IExtension extension) { String result = extension.getUniqueIdentifier(); if (result == null) { result = extension.getNamespaceIdentifier(); } return result; } }
public String getNamespaceIdentifier() { // namespace name is determined by the contributing extension return getDeclaringExtension().getNamespaceIdentifier(); }
public String getPluginId() { return configElement.getDeclaringExtension().getNamespaceIdentifier(); }
/** * Obtains the ID of the specified extension, * or the defining plug-in ID if the extension has none. * * @param extension an extension * @return an identifier for the extension */ private String getExtensionID(IExtension extension) { String result = extension.getUniqueIdentifier(); if (result == null) { result = extension.getNamespaceIdentifier(); } return result; } }
/** * Logs the error in the workbench log using the provided text and the information in the * configuration element. */ protected static void logError(IConfigurationElement element, String text) { IExtension extension = element.getDeclaringExtension(); StringBuffer buf = new StringBuffer(); buf.append("Plugin " + extension.getNamespaceIdentifier() + ", extension " + extension.getExtensionPointUniqueIdentifier());//$NON-NLS-2$//$NON-NLS-1$ buf.append("\n" + text);//$NON-NLS-1$ NavigatorPlugin.logError(0, buf.toString(), null); }
/** * Logs the error in the workbench log using the provided text and the * information in the configuration element. */ protected void logError(IConfigurationElement element, String text) { IExtension extension = element.getDeclaringExtension(); StringBuffer buf = new StringBuffer(); buf.append("Plugin " + extension.getNamespaceIdentifier() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$ buf.append("\n" + text); //$NON-NLS-1$ TeamUIPlugin.log(IStatus.ERROR, buf.toString(), null); } /**
@Override public void loadTargetDefinition(ITargetDefinition definition, String targetExtensionId) throws CoreException { IConfigurationElement elem = PDECore.getDefault().getTargetProfileManager().getTarget(targetExtensionId); if (elem == null) { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.TargetPlatformService_2, targetExtensionId))); } String path = elem.getAttribute("definition"); //$NON-NLS-1$ String symbolicName = elem.getDeclaringExtension().getNamespaceIdentifier(); URL url = TargetDefinitionManager.getResourceURL(symbolicName, path); if (url != null) { try { ((TargetDefinition) definition).setContents(new BufferedInputStream(url.openStream())); } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.TargetPlatformService_3, path), e)); } } else { throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.TargetPlatformService_4, path))); } }
private static void getApplicationRequirements(String application, Collection requiredIds) { PDEExtensionRegistry registry = PDECore.getDefault().getExtensionsRegistry(); IExtension[] extensions = registry.findExtensions("org.eclipse.core.runtime.applications", true); //$NON-NLS-1$ for (int i = 0; i < extensions.length; i++) { if (application.equals(extensions[i].getUniqueIdentifier()) || application.equals(extensions[i].getSimpleIdentifier())) { requiredIds.add(extensions[i].getNamespaceIdentifier()); // Only one extension should match the application so break out of the looop break; } } } }
private static void getProductRequirements(String product, Collection requiredIds) { PDEExtensionRegistry registry = PDECore.getDefault().getExtensionsRegistry(); IExtension[] extensions = registry.findExtensions("org.eclipse.core.runtime.products", true); //$NON-NLS-1$ for (int i = 0; i < extensions.length; i++) { if (product.equals(extensions[i].getUniqueIdentifier()) || product.equals(extensions[i].getSimpleIdentifier())) { requiredIds.add(extensions[i].getNamespaceIdentifier()); IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { String application = elements[j].getAttribute("application"); //$NON-NLS-1$ if (application != null && application.length() > 0) { getApplicationRequirements(application, requiredIds); } } // Only one extension should match the product so break out of the looop break; } } }
public String toString() { return "\n\t\t" + getExtensionPoint().getUniqueIdentifier() + " - " + getExtension().getNamespaceIdentifier() + '.' + getExtension().getSimpleIdentifier() + " (" + getKindString(this.getKind()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ }
@Override public String toString() { return "\n\t\t" + getExtensionPoint().getUniqueIdentifier() + " - " + getExtension().getNamespaceIdentifier() + '.' + getExtension().getSimpleIdentifier() + " (" + getKindString(this.getKind()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ }
public String toString() { return "\n\t\t" + getExtensionPoint().getUniqueIdentifier() + " - " + getExtension().getNamespaceIdentifier() + '.' + getExtension().getSimpleIdentifier() + " (" + getKindString(this.getKind()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ }
public String toString() { return "\n\t\t" + getExtensionPoint().getUniqueIdentifier() + " - " + getExtension().getNamespaceIdentifier() + '.' + getExtension().getSimpleIdentifier() + " (" + getKindString(this.getKind()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ }