for (IExtension extension : extensions) {
IConfigurationElement[] elements = extension.getConfigurationElements();
for (IConfigurationElement configElt : elements) {
String libPathAsString;
String pluginId;
IContributor contributor = null;
try {
contributor = configElt.getContributor();
if (contributor == null) {
throw new IllegalArgumentException("Null contributor");
}
pluginId = configElt.getAttribute(PLUGIN_ID);
if (pluginId == null) {
throw new IllegalArgumentException("Missing '" + PLUGIN_ID + "'");
}
libPathAsString = configElt.getAttribute(LIBRARY_PATH);
if (libPathAsString == null) {
throw new IllegalArgumentException("Missing '" + LIBRARY_PATH + "'");
}
libPathAsString = resolveRelativePath(contributor, libPathAsString);
if (libPathAsString == null) {
throw new IllegalArgumentException("Failed to resolve library path for: " + pluginId);
}
if(set.containsKey(pluginId)) {
throw new IllegalArgumentException("Duplicated '" + pluginId + "' contribution.");
}
set.put(pluginId, libPathAsString);
} catch (Throwable e) {
String cName = contributor != null ? contributor.getName() : "unknown contributor";
String message = "Failed to read contribution for '" + EXTENSION_POINT_ID
+ "' extension point from " + cName;
FindbugsPlugin.getDefault().logException(e, message);
continue;
}