Skip to content

Commit b797e37

Browse files
committed
Show bundle info for failed bundles if given
Currently instead of the bundle name and version only the error message is displayed what makes it quite hard for the user to identify the culprit. This now checks if bundle info is available and then show these in front of the error message.
1 parent f3f6fb6 commit b797e37

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,16 @@ private StyledString getInternalStyledString(Object element) {
131131
appendBundleInfo(styledString,
132132
new BundleInfo(descriptor.getId(), descriptor.getVersion(), null, BundleInfo.NO_LEVEL, false));
133133
} else if (element instanceof TargetBundle bundle) {
134-
if (bundle.getStatus().isOK()) {
134+
IStatus status = bundle.getStatus();
135+
if (status.isOK()) {
135136
appendBundleInfo(styledString, bundle.getBundleInfo());
136137
} else {
137-
// TODO Better error message for missing bundles
138-
styledString.append(bundle.getStatus().getMessage());
138+
BundleInfo bundleInfo = bundle.getBundleInfo();
139+
if (bundleInfo != null && bundleInfo.getSymbolicName() != null) {
140+
appendBundleInfo(styledString, bundleInfo);
141+
styledString.append(' ');
142+
}
143+
styledString.append(status.getMessage());
139144
}
140145
} else if (element instanceof IStatus status) {
141146
styledString.append(status.getMessage());

0 commit comments

Comments
 (0)