Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-01-25 21:53:04 +0000
committerDarin Wright2006-01-25 21:53:04 +0000
commit570d6d68d4bb46f293067c2fc1c2e0bbac2688ce (patch)
tree74d46fbfd12c4fb735dc5b779091e4064351b2b6 /org.eclipse.debug.core
parentdda6617546b2cab7f5fdfd153dbddfbf47847da1 (diff)
downloadeclipse.platform.debug-570d6d68d4bb46f293067c2fc1c2e0bbac2688ce.tar.gz
eclipse.platform.debug-570d6d68d4bb46f293067c2fc1c2e0bbac2688ce.tar.xz
eclipse.platform.debug-570d6d68d4bb46f293067c2fc1c2e0bbac2688ce.zip
Bug 105235 - TVT 3.1: TCT479 - mnemonic char in middle of DBCS menu label
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchMode.java15
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties1
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchMode.java11
-rw-r--r--org.eclipse.debug.core/plugin.properties3
-rw-r--r--org.eclipse.debug.core/plugin.xml3
-rw-r--r--org.eclipse.debug.core/schema/launchModes.exsd10
7 files changed, 45 insertions, 0 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchMode.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchMode.java
index 5ddc8ed58..00360a23f 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchMode.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchMode.java
@@ -47,4 +47,19 @@ public interface ILaunchMode {
* @return a human readable label for this launch mode
*/
public String getLabel();
+
+ /**
+ * Returns a human readable label for this launch mode when used in a
+ * cascade menu. For example, "Run As". Allows the label to be
+ * properly localized.
+ * <p>
+ * A new attribute has been added the the launch mode extension in 3.2
+ * to specify this label. When unspecified a default label is generated
+ * by concatenation, for backwards compatibility.
+ * </p>
+ * @return human readable label for this launch mode when used in a
+ * cascade menu
+ * @since 3.2
+ */
+ public String getLaunchAsLabel();
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
index 03c568dec..138aca100 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
@@ -110,4 +110,6 @@ public class DebugCoreMessages extends NLS {
}
public static String LaunchConfiguration_10;
+
+ public static String LaunchMode_0;
} \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
index 9c16cf864..47480802a 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
@@ -77,6 +77,7 @@ LaunchManager_An_exception_occurred_during_launch_configuration_change_notificat
LaunchManager_30=Unable to retrieve shared launch configuration file for {0}
LaunchMode_1=Required attribute {0} missing for launchMode extension.
+LaunchMode_0={0} As
LogicalStructureType_7=Required attribute {0} missing for logicalStructureType extension.
LogicalStructureType_0=<Missing Description>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchMode.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchMode.java
index 741afd8c2..b5038ce63 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchMode.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchMode.java
@@ -72,4 +72,15 @@ public class LaunchMode implements ILaunchMode {
public String getLabel() {
return fConfigurationElement.getAttribute("label"); //$NON-NLS-1$;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchMode#getLaunchAsLabel()
+ */
+ public String getLaunchAsLabel() {
+ String label = fConfigurationElement.getAttribute("launchAsLabel"); //$NON-NLS-1$
+ if (label == null) {
+ return MessageFormat.format(DebugCoreMessages.LaunchMode_0, new String[]{getLabel()});
+ }
+ return label;
+ }
}
diff --git a/org.eclipse.debug.core/plugin.properties b/org.eclipse.debug.core/plugin.properties
index 617aa08eb..cf51929a1 100644
--- a/org.eclipse.debug.core/plugin.properties
+++ b/org.eclipse.debug.core/plugin.properties
@@ -32,6 +32,9 @@ sourcePathComputersName = Source Path Computers
run=&Run
debug=&Debug
profile=&Profile
+runAs.label=&Run As
+debugAs.label=&Debug As
+profileAs.label=&Profile As
env_var.description=Returns the value of an environment variable. An environment variable name must be specified as an argument.
system_var.description=Returns the value of an Eclipse system variable. A variable name must be specified as an argument - one of ARCH, ECLIPSE_HOME, NL, OS, or WS.
diff --git a/org.eclipse.debug.core/plugin.xml b/org.eclipse.debug.core/plugin.xml
index 90491c80c..b661755e9 100644
--- a/org.eclipse.debug.core/plugin.xml
+++ b/org.eclipse.debug.core/plugin.xml
@@ -66,14 +66,17 @@
point="org.eclipse.debug.core.launchModes">
<launchMode
label="%run"
+ launchAsLabel="%runAs.label"
mode="run">
</launchMode>
<launchMode
label="%debug"
+ launchAsLabel="%debugAs.label"
mode="debug">
</launchMode>
<launchMode
label="%profile"
+ launchAsLabel="%profileAs.label"
mode="profile">
</launchMode>
</extension>
diff --git a/org.eclipse.debug.core/schema/launchModes.exsd b/org.eclipse.debug.core/schema/launchModes.exsd
index aa3628eaa..a14503655 100644
--- a/org.eclipse.debug.core/schema/launchModes.exsd
+++ b/org.eclipse.debug.core/schema/launchModes.exsd
@@ -65,6 +65,16 @@
</appInfo>
</annotation>
</attribute>
+ <attribute name="launchAsLabel" type="string">
+ <annotation>
+ <documentation>
+ A human-readable label to be used in a launch cascade menu. For example &quot;Run As&quot;. This attribute was added in 3.2 to allow the label to be properly externalized. When unspecified, a default label is created via concatenation.
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
</complexType>
</element>

Back to the top