1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 14:15:23 +02:00

Bug 510892: Include the launch target's id in the overlay image id

Otherwise, launch targets with same type, but different ids, will get
the wrong icon, but only when the target status is != OK.

Change-Id: I97e5713bec16eb3a08cae3ffe58bc4fab51b04df
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
This commit is contained in:
Jesper Eskilson 2017-01-23 17:48:07 +01:00
parent b57aa9d336
commit 573a55c8ba

View file

@ -100,7 +100,6 @@ public class TargetSelector extends CSelector implements ILaunchTargetListener {
return null;
}
if (element instanceof ILaunchTarget) {
// TODO apply a status overlay
ILaunchTarget target = (ILaunchTarget) element;
ILabelProvider provider = targetUIManager.getLabelProvider(target);
if (provider != null) {
@ -109,8 +108,8 @@ public class TargetSelector extends CSelector implements ILaunchTargetListener {
if (status.getCode() == Code.OK) {
return baseImage;
} else {
String compId = target.getTypeId()
+ (status.getCode() == Code.ERROR ? ".error" : ".warning"); //$NON-NLS-1$ //$NON-NLS-2$
String compId = String.format("%s.%s.%s", target.getTypeId(), target.getId(),
status.getCode());
Image image = Activator.getDefault().getImageRegistry().get(compId);
if (image == null && baseImage != null) {
ImageDescriptor desc = new CompositeImageDescriptor() {