diff options
author | Thomas Schindl | 2010-07-17 16:57:49 +0000 |
---|---|---|
committer | Thomas Schindl | 2010-07-17 16:57:49 +0000 |
commit | 07ca24a702e4da454b42f78df756549ea8be5f9a (patch) | |
tree | 00864dcf61c41cbca53db08ce3478775108ba706 | |
parent | 7ff6bc536d2f252608f0a85303627746b1faf569 (diff) | |
download | org.eclipse.e4.tools-07ca24a702e4da454b42f78df756549ea8be5f9a.tar.gz org.eclipse.e4.tools-07ca24a702e4da454b42f78df756549ea8be5f9a.tar.xz org.eclipse.e4.tools-07ca24a702e4da454b42f78df756549ea8be5f9a.zip |
Bug 304584 - [Tooling] Implement Workbench-Model-Tooling
* some nls stuff
3 files changed, 14 insertions, 5 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java index 684ba65d..a59c9d10 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java @@ -266,6 +266,9 @@ public class Messages extends NLS { public static String BindingContextSelectionDialog_LabelContextId; + public static String ComponentLabelProvider_invisible; + public static String ComponentLabelProvider_notrendered; + static { NLS.initializeMessages(Messages.class.getName(), Messages.class); } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties index 0b4672b4..2890de86 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties @@ -260,4 +260,7 @@ CategoryEditor_Description=Description CategoryEditor_Tags=Tags CommandCategorySelectionDialog_LabelCategoryId=Category Id -BindingContextSelectionDialog_LabelContextId=Context Id
\ No newline at end of file +BindingContextSelectionDialog_LabelContextId=Context Id + +ComponentLabelProvider_invisible=invisible +ComponentLabelProvider_notrendered=not rendered
\ No newline at end of file diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java index e12afdf2..b52a0d76 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java @@ -11,6 +11,7 @@ package org.eclipse.e4.tools.emf.ui.internal.common; import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor; +import org.eclipse.e4.tools.emf.ui.internal.Messages; import org.eclipse.e4.ui.model.application.ui.MUIElement; import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.resource.JFaceResources; @@ -32,14 +33,16 @@ public class ComponentLabelProvider extends StyledCellLabelProvider { private ModelEditor editor; + private static final String NOT_RENDERED_KEY = "NOT_RENDERED_STYLER";//$NON-NLS-1$ + private static Styler NOT_RENDERED_STYLER = new Styler() { { - JFaceResources.getColorRegistry().put("NOT_RENDERED_STYLER", new RGB(200, 200, 200)); + JFaceResources.getColorRegistry().put(NOT_RENDERED_KEY, new RGB(200, 200, 200)); } @Override public void applyStyles(TextStyle textStyle) { - textStyle.foreground = JFaceResources.getColorRegistry().get("NOT_RENDERED_STYLER"); + textStyle.foreground = JFaceResources.getColorRegistry().get(NOT_RENDERED_KEY); } }; @@ -60,10 +63,10 @@ public class ComponentLabelProvider extends StyledCellLabelProvider { if (o instanceof MUIElement) { if (!((MUIElement) o).isVisible()) { - label += "<invisible>"; + label += "<" + Messages.ComponentLabelProvider_invisible + ">"; //$NON-NLS-1$//$NON-NLS-2$ styler = NOT_RENDERED_STYLER; } else if (!((MUIElement) o).isToBeRendered()) { - label += "<not rendered>"; + label += "<" + Messages.ComponentLabelProvider_notrendered + ">"; //$NON-NLS-1$ //$NON-NLS-2$ styler = NOT_RENDERED_STYLER; } } |