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:
parent
b57aa9d336
commit
573a55c8ba
1 changed files with 2 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue