Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2001-09-18 17:02:18 +0000
committerDarin Wright2001-09-18 17:02:18 +0000
commit5712234a3dff4eb86485017879d9284decfcb8b6 (patch)
tree77ff50a1f46b0da805b9e8049da27ed9844a42d8 /org.eclipse.debug.core
parent30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed (diff)
downloadeclipse.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')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java15
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java18
-rw-r--r--org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html6
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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.
&nbsp; If &quot;true&quot;,&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modes = &quot;run, debug&quot;
label = &quot;Example Launcher&quot;
wizard = &quot;com.example.launchers.ui.ExampleLaunchWizard&quot;
+ icon = &quot;icons/exampleLauncher.gif&quot;
public = &quot;true&quot;
description = &quot;Launches example programs&quot;
perspective= &quot;com.example.JavaPerspective&quot;&gt;</tt>

Back to the top