Lines 20-25
Link Here
|
20 |
import org.eclipse.jface.resource.ImageDescriptor; |
20 |
import org.eclipse.jface.resource.ImageDescriptor; |
21 |
import org.eclipse.osgi.service.resolver.BundleDescription; |
21 |
import org.eclipse.osgi.service.resolver.BundleDescription; |
22 |
import org.eclipse.osgi.service.resolver.ResolverError; |
22 |
import org.eclipse.osgi.service.resolver.ResolverError; |
|
|
23 |
import org.eclipse.osgi.util.NLS; |
23 |
import org.eclipse.pde.core.build.IBuildEntry; |
24 |
import org.eclipse.pde.core.build.IBuildEntry; |
24 |
import org.eclipse.pde.core.plugin.*; |
25 |
import org.eclipse.pde.core.plugin.*; |
25 |
import org.eclipse.pde.internal.core.*; |
26 |
import org.eclipse.pde.internal.core.*; |
Lines 50-55
Link Here
|
50 |
import org.osgi.framework.Version; |
51 |
import org.osgi.framework.Version; |
51 |
|
52 |
|
52 |
public class PDELabelProvider extends SharedLabelProvider { |
53 |
public class PDELabelProvider extends SharedLabelProvider { |
|
|
54 |
private static final String SYSTEM_BUNDLE = "system.bundle"; //$NON-NLS-1$ |
55 |
|
53 |
public PDELabelProvider() { |
56 |
public PDELabelProvider() { |
54 |
} |
57 |
} |
55 |
|
58 |
|
Lines 162-172
Link Here
|
162 |
text = name + ' ' + formatVersion(pluginBase.getVersion()); |
165 |
text = name + ' ' + formatVersion(pluginBase.getVersion()); |
163 |
else |
166 |
else |
164 |
text = name; |
167 |
text = name; |
|
|
168 |
if (SYSTEM_BUNDLE.equals(pluginBase.getId())) { |
169 |
text += getSystemBundleInfo(); |
170 |
} |
165 |
if (pluginBase.getModel() != null && !pluginBase.getModel().isInSync()) |
171 |
if (pluginBase.getModel() != null && !pluginBase.getModel().isInSync()) |
166 |
text += " " + PDEUIMessages.PluginModelManager_outOfSync; //$NON-NLS-1$ |
172 |
text += " " + PDEUIMessages.PluginModelManager_outOfSync; //$NON-NLS-1$ |
167 |
return text; |
173 |
return text; |
168 |
} |
174 |
} |
169 |
|
175 |
|
|
|
176 |
private String getSystemBundleInfo() { |
177 |
IPluginBase systemBundle = PluginRegistry.findModel(SYSTEM_BUNDLE).getPluginBase(); |
178 |
return NLS.bind(" [{0} ({1})]", systemBundle.getId(), systemBundle.getVersion()); //$NON-NLS-1$ |
179 |
} |
180 |
|
170 |
private String preventNull(String text) { |
181 |
private String preventNull(String text) { |
171 |
return text != null ? text : ""; //$NON-NLS-1$ |
182 |
return text != null ? text : ""; //$NON-NLS-1$ |
172 |
} |
183 |
} |
Lines 185-190
Link Here
|
185 |
version = formatVersion(version); |
196 |
version = formatVersion(version); |
186 |
|
197 |
|
187 |
String text = isFullNameModeEnabled() ? obj.toString() : preventNull(obj.getId()); |
198 |
String text = isFullNameModeEnabled() ? obj.toString() : preventNull(obj.getId()); |
|
|
199 |
if (SYSTEM_BUNDLE.equals(obj.getId())) |
200 |
return text + getSystemBundleInfo(); |
188 |
return version == null || version.length() == 0 ? text : text + " " + version; //$NON-NLS-1$ |
201 |
return version == null || version.length() == 0 ? text : text + " " + version; //$NON-NLS-1$ |
189 |
} |
202 |
} |
190 |
|
203 |
|
Lines 577-582
Link Here
|
577 |
if (javaSearch) |
590 |
if (javaSearch) |
578 |
flags |= F_JAVA; |
591 |
flags |= F_JAVA; |
579 |
ImageDescriptor desc = PDEPluginImages.DESC_PLUGIN_OBJ; |
592 |
ImageDescriptor desc = PDEPluginImages.DESC_PLUGIN_OBJ; |
|
|
593 |
if (SYSTEM_BUNDLE.equals(plugin.getId())) |
594 |
desc = PDEPluginImages.DESC_SYSPLUGIN_OBJ; |
580 |
if (checkEnabled && model.isEnabled() == false) |
595 |
if (checkEnabled && model.isEnabled() == false) |
581 |
desc = PDEPluginImages.DESC_EXT_PLUGIN_OBJ; |
596 |
desc = PDEPluginImages.DESC_EXT_PLUGIN_OBJ; |
582 |
return get(desc, flags); |
597 |
return get(desc, flags); |
Lines 642-648
Link Here
|
642 |
} |
657 |
} |
643 |
|
658 |
|
644 |
protected ImageDescriptor getRequiredPluginImageDescriptor(IPluginImport iobj) { |
659 |
protected ImageDescriptor getRequiredPluginImageDescriptor(IPluginImport iobj) { |
645 |
return PDEPluginImages.DESC_REQ_PLUGIN_OBJ; |
660 |
return (SYSTEM_BUNDLE.equals(iobj.getId()) ? PDEPluginImages.DESC_REQ_SYSPLUGIN_OBJ : PDEPluginImages.DESC_REQ_PLUGIN_OBJ); |
646 |
} |
661 |
} |
647 |
|
662 |
|
648 |
private Image getObjectImage(IPluginImport obj) { |
663 |
private Image getObjectImage(IPluginImport obj) { |