Author: rob.stryker(a)jboss.com
Date: 2008-01-29 17:23:42 -0500 (Tue, 29 Jan 2008)
New Revision: 6019
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/NodeContribution.java
Log:
JBIDE-1404 - wrapper did not account for nulls in extension point.
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/NodeContribution.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/NodeContribution.java 2008-01-29
20:10:47 UTC (rev 6018)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/NodeContribution.java 2008-01-29
22:23:42 UTC (rev 6019)
@@ -31,13 +31,13 @@
String iconPath = element.getAttribute("icon");
String pluginId = element.getDeclaringExtension().getNamespaceIdentifier();
Bundle bundle = Platform.getBundle(pluginId);
- URL iconURL = FileLocator.find(bundle, new Path(iconPath), null);
- if (iconURL == null) {
+ URL iconURL = iconPath == null ? null : FileLocator.find(bundle, new Path(iconPath),
null);
+ if (iconURL != null) {
iconURL = bundle.getEntry(iconPath);
+ icon = ImageDescriptor.createFromURL(iconURL);
}
- icon = ImageDescriptor.createFromURL(iconURL);
-
- weight = Integer.parseInt(element.getAttribute("weight"));
+ String weightString = element.getAttribute("weight");
+ weight = Integer.parseInt(weightString == null ? "100" : weightString);
}
public int compareTo(Object o) {
Show replies by date