List of usage examples for org.eclipse.jdt.internal.core JavaModelManager CPCONTAINER_INITIALIZER_EXTPOINT_ID
String CPCONTAINER_INITIALIZER_EXTPOINT_ID
To view the source code for org.eclipse.jdt.internal.core JavaModelManager CPCONTAINER_INITIALIZER_EXTPOINT_ID.
Click Source Link
From source file:org.eclipse.jdt.internal.core.JavaModelManager.java
License:Open Source License
/** * Returns the name of the container IDs for which an CP container initializer is registered through an extension point *//* w w w .j a v a2 s.c o m*/ public static String[] getRegisteredContainerIDs() { Plugin jdtCorePlugin = JavaCore.getPlugin(); if (jdtCorePlugin == null) return null; ArrayList containerIDList = new ArrayList(5); IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(JavaCore.PLUGIN_ID, JavaModelManager.CPCONTAINER_INITIALIZER_EXTPOINT_ID); if (extension != null) { IExtension[] extensions = extension.getExtensions(); for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] configElements = extensions[i].getConfigurationElements(); for (int j = 0; j < configElements.length; j++) { String idAttribute = configElements[j].getAttribute("id"); //$NON-NLS-1$ if (idAttribute != null) containerIDList.add(idAttribute); } } } String[] containerIDs = new String[containerIDList.size()]; containerIDList.toArray(containerIDs); return containerIDs; }