diff options
author | Darin Wright | 2001-09-18 17:02:18 +0000 |
---|---|---|
committer | Darin Wright | 2001-09-18 17:02:18 +0000 |
commit | 5712234a3dff4eb86485017879d9284decfcb8b6 (patch) | |
tree | 77ff50a1f46b0da805b9e8049da27ed9844a42d8 /org.eclipse.debug.core | |
parent | 30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed (diff) | |
download | eclipse.platform.debug-5712234a3dff4eb86485017879d9284decfcb8b6.tar.gz eclipse.platform.debug-5712234a3dff4eb86485017879d9284decfcb8b6.tar.xz eclipse.platform.debug-5712234a3dff4eb86485017879d9284decfcb8b6.zip |
1GHP2H1: ITPDUI:ALL - API Change: Icons for launchers
Diffstat (limited to 'org.eclipse.debug.core')
3 files changed, 32 insertions, 7 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java index 185178745..3a066fc17 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java @@ -5,10 +5,11 @@ package org.eclipse.debug.core; * All Rights Reserved.
*/
-import org.eclipse.debug.core.model.ILauncherDelegate;
-import org.eclipse.core.runtime.IConfigurationElement;
import java.util.Set;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.debug.core.model.ILauncherDelegate;
+
/**
* A launcher is a proxy to a launcher extension (<code>"org.eclipse.debug.core.launchers"</code>).
* It manages the attributes of a launcher extension, and lazily instantiates the
@@ -92,4 +93,14 @@ public interface ILauncher { * @return the underlying launcher extension
*/
ILauncherDelegate getDelegate();
+
+ /**
+ * Returns the icon path defined by the underlying launcher extension.
+ * The path is relative to the plugin.xml of the contributing plug-in.
+ * This will not cause the extension to be instantiated. Returns
+ * <code>null</code> if no icon attribute is specified.
+ *
+ * @return a relative path to an icon or <code>null</code>
+ */
+ String getIconPath();
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java index bbc5e07ca..e27922cc4 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java @@ -5,14 +5,15 @@ package org.eclipse.debug.internal.core; * All Rights Reserved.
*/
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.core.model.ILauncherDelegate;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.debug.core.ILauncher;
+import org.eclipse.debug.core.model.ILauncherDelegate;
+
/**
* A handle to a launcher extension that instantiates the actual
* extension lazily.
@@ -69,7 +70,7 @@ public class Launcher implements ILauncher { }
/**
- * Returns the label specified in the configuration data.
+ * @see ILauncher.
*/
public String getLabel() {
return fConfigElement.getAttribute("label");
@@ -109,4 +110,11 @@ public class Launcher implements ILauncher { public IConfigurationElement getConfigurationElement() {
return fConfigElement;
}
+
+ /**
+ * @see ILanucher.
+ */
+ public String getIconPath() {
+ return fConfigElement.getAttribute("icon");
+ }
}
\ No newline at end of file diff --git a/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html b/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html index 7de678dec..a93dbfb90 100644 --- a/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html +++ b/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html @@ -24,6 +24,7 @@ registering the result with the launch manager.</p> <tt> modes CDATA #REQUIRED
</tt> label CDATA #REQUIRED
wizard CDATA #IMPLIED
+ icon CDATA #IMPLIED
public CDATA #IMPLIED
description CDATA #IMPLIED
<tt>perspective CDATA #IMPLIED
@@ -44,6 +45,10 @@ registering the result with the launch manager.</p> <b>org.eclipse.debug.ui.ILaunchWizard</b>. This attribute is used by
the debug UI. A launcher may contribute a wizard that allows users to configure and launch
specific attributes.</li>
+ <li><strong>icon </strong>- a relative path for an icon that will be used to visually
+ represent the launcher. If omitted, a default icon will be used for this launcher.
+ The path is relative to the location of the plugin.xml file of the contributing
+ plug-in.</li>
<li><strong>public</strong> - whether a launcher is publically visible in the debug UI.
If "true", the launcher will be available from the debug UI - the
launcher will appear as a choice for a default launcher, launches created by this launcher
@@ -68,6 +73,7 @@ registering the result with the launch manager.</p> <tt> modes = "run, debug"
label = "Example Launcher"
wizard = "com.example.launchers.ui.ExampleLaunchWizard"
+ icon = "icons/exampleLauncher.gif"
public = "true"
description = "Launches example programs"
perspective= "com.example.JavaPerspective"></tt>
|