/**
* Construct <code>ExtensionPointIterator</code>.
*/
private ExtensionPointList( String xpid ) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
if (extensionPoint == null)
return;
// For each extension ...
for( IExtension extension : extensionPoint.getExtensions() ) {
try {
addAll(Arrays.asList(extension.getConfigurationElements()));
} catch (Exception e) {
Bundle bundle = Platform.getBundle(extensionPoint.getNamespaceIdentifier());
if (bundle == null) {
if (CorePlugin.getDefault().isDebugging()) {
System.out
.println("Could not locate bundle for " + extensionPoint.getUniqueIdentifier()); //$NON-NLS-1$
}
bundle = CorePlugin.getDefault().getBundle();
}
ILog log = Platform.getLog(bundle);
log.log(new Status(Status.ERROR, extension.getNamespaceIdentifier(), 0,
extensionPoint.getUniqueIdentifier() + Messages.ExtensionPointList_problem
+ e, e));
}
}
}