Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2012-01-18 17:47:12 +0000
committerCurtis Windatt2012-01-18 17:47:12 +0000
commit17f55b06b9862628426d259639c21c7d67b89181 (patch)
tree5b0e3385a798ace0d4711ee5a0bc6abd83b27ddf
parent0d84238e4fd1050c5e3d54d2ddea8dfd787a9422 (diff)
downloadeclipse.pde.ui-17f55b06b9862628426d259639c21c7d67b89181.tar.gz
eclipse.pde.ui-17f55b06b9862628426d259639c21c7d67b89181.tar.xz
eclipse.pde.ui-17f55b06b9862628426d259639c21c7d67b89181.zip
Bug 366405 - NPE on loading PDE Target Platform with DirectoryBundleContainer having jars with non-OSGi manifests
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
index 36d2732ee8..113ec4d03d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
@@ -166,7 +166,17 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
* @param info element to append
*/
private void appendBundleInfo(StyledString styledString, BundleInfo info) {
- styledString.append(info.getSymbolicName());
+ String name = info.getSymbolicName();
+ if (name == null) {
+ // Try the location instead
+ URI location = info.getLocation();
+ if (location != null) {
+ name = location.toString();
+ }
+ }
+ if (name != null) {
+ styledString.append(name);
+ }
if (fShowVersion) {
String version = info.getVersion();
if (version != null && !version.equals(BundleInfo.EMPTY_VERSION)) {

Back to the top