Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Jongman2013-03-18 11:00:06 -0400
committerWim Jongman2013-03-18 11:00:06 -0400
commit6f8fdfab66b65747048accc9c8236975f372a5b7 (patch)
tree68c48e3a64c9a69069d4a0246df4c24d651f08c1
parent797781f7fea88a7a02749dabf9aec56ca63eaad2 (diff)
downloadorg.eclipse.e4.tools-6f8fdfab66b65747048accc9c8236975f372a5b7.tar.gz
org.eclipse.e4.tools-6f8fdfab66b65747048accc9c8236975f372a5b7.tar.xz
org.eclipse.e4.tools-6f8fdfab66b65747048accc9c8236975f372a5b7.zip
[Bug 403640] fixed for commands
added translate method to abstractcomponent editor https://bugs.eclipse.org/bugs/show_bug.cgi?id=403640
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java
index b1a043b7..b0b45a14 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java
@@ -132,6 +132,10 @@ public abstract class AbstractComponentEditor {
return Collections.emptyList();
}
+ public String translate(String string) {
+ return ControlFactory.tr(translationProvider, locale, string);
+ }
+
/**
* @param element
* @return the list of actions that are populated in the import menu. Can be
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java
index 84538ceb..1f74b3fa 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java
@@ -314,9 +314,8 @@ public class CommandEditor extends AbstractComponentEditor {
public String getDetailLabel(Object element) {
MCommand cmd = (MCommand) element;
if (cmd.getCommandName() != null && cmd.getCommandName().trim().length() > 0) {
- return cmd.getCommandName();
+ return translate(cmd.getCommandName());
}
-
return null;
}

Back to the top