Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2001-09-18 17:29:32 +0000
committerDarin Wright2001-09-18 17:29:32 +0000
commitf126144fee5783770d3c9b6b7617971761bcfa79 (patch)
treee4975b88fca555ee985478695129a5928f9b6ec2
parent58014b7f85dc7041cfe0ae23f7ece52e509a932b (diff)
downloadeclipse.platform.debug-f126144fee5783770d3c9b6b7617971761bcfa79.tar.gz
eclipse.platform.debug-f126144fee5783770d3c9b6b7617971761bcfa79.tar.xz
eclipse.platform.debug-f126144fee5783770d3c9b6b7617971761bcfa79.zip
1GHP2H1: ITPDUI:ALL - API Change: Icons for launchers
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java38
1 files changed, 17 insertions, 21 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
index 3000646cd..4f2091fe8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
@@ -123,41 +123,37 @@ public class DelegatingModelPresentation implements IDebugModelPresentation {
return iRegistry.get(IDebugUIConstants.IMG_OBJS_OS_PROCESS);
}
} else
- if (item instanceof ILaunch) {
- ILaunch launch = (ILaunch) item;
- Image image = getLaunchImage(launch);
- if (image == null) {
- // return default image
+ if (item instanceof ILauncher) {
+ return getLauncherImage((ILauncher)item);
+ } else
+ if (item instanceof ILaunch) {
+ ILaunch launch = (ILaunch) item;
String mode= launch.getLaunchMode();
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
return iRegistry.get(IDebugUIConstants.IMG_ACT_DEBUG);
} else {
return iRegistry.get(IDebugUIConstants.IMG_ACT_RUN);
}
- } else {
- return image;
- }
- } else
- if (item instanceof InspectItem) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_EXPRESSION);
} else
- if (item instanceof IAdaptable) {
- IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) item).getAdapter(IWorkbenchAdapter.class);
- if (de != null) {
- ImageDescriptor descriptor= de.getImageDescriptor(item);
- if( descriptor != null) {
- return descriptor.createImage();
+ if (item instanceof InspectItem) {
+ return iRegistry.get(IDebugUIConstants.IMG_OBJS_EXPRESSION);
+ } else
+ if (item instanceof IAdaptable) {
+ IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) item).getAdapter(IWorkbenchAdapter.class);
+ if (de != null) {
+ ImageDescriptor descriptor= de.getImageDescriptor(item);
+ if( descriptor != null) {
+ return descriptor.createImage();
+ }
}
}
- }
-
+
return null;
}
}
- protected Image getLaunchImage(ILaunch launch) {
- ILauncher launcher = launch.getLauncher();
+ protected Image getLauncherImage(ILauncher launcher) {
String iconPath = launcher.getIconPath();
if (iconPath != null) {
// return custom image

Back to the top