diff options
author | Jens Lidestrom | 2019-11-03 10:31:37 +0000 |
---|---|---|
committer | Jens Lidestrom | 2019-11-03 10:50:57 +0000 |
commit | 5fd5cd88779163ce7234e1ea1d82e0e759cc4fe2 (patch) | |
tree | 76f67f79a05fa6741f82b20989fa56903827bf40 | |
parent | 7dfcbcf7c72f6ba45fb7965cfa1e2643cb70f512 (diff) | |
download | eclipse.platform.ui.tools-5fd5cd88779163ce7234e1ea1d82e0e759cc4fe2.tar.gz eclipse.platform.ui.tools-5fd5cd88779163ce7234e1ea1d82e0e759cc4fe2.tar.xz eclipse.platform.ui.tools-5fd5cd88779163ce7234e1ea1d82e0e759cc4fe2.zip |
Fix ModelEditor pref color loading
ModelEditor did not load color preferences properly.
Change-Id: Iea4f3d1fde0c5889ff5b438e7dd20ef4dd28fbbc
Signed-off-by: Jens Lidestrom <jens@lidestrom.se>
-rw-r--r-- | bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java index 053c33d7..2a7a2d73 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java @@ -1312,12 +1312,12 @@ public class ModelEditor implements IGotoObject { } @Inject - public void setNotVisibleColor(@Preference(ModelEditorPreferences.NOT_VISIBLE_COLOR) String color) { + public void setNotVisibleColor(@Preference(ModelEditorPreferences.NOT_VISIBLE_COLOR) String prefColorText) { final RGB current = JFaceResources.getColorRegistry().getRGB(ComponentLabelProvider.NOT_VISIBLE_KEY); + RGB prefColor = StringConverter.asRGB(prefColorText, new RGB(200, 200, 200)); - if (current == null || !current.equals(color)) { - JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_VISIBLE_KEY, - StringConverter.asRGB(color, new RGB(200, 200, 200))); + if (current == null || !current.equals(prefColor)) { + JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_VISIBLE_KEY, prefColor); } if (viewer != null) { @@ -1327,12 +1327,12 @@ public class ModelEditor implements IGotoObject { } @Inject - public void setNotRenderedColor(@Preference(ModelEditorPreferences.NOT_RENDERED_COLOR) String color) { + public void setNotRenderedColor(@Preference(ModelEditorPreferences.NOT_RENDERED_COLOR) String prefColorText) { + RGB prefColor = StringConverter.asRGB(prefColorText, new RGB(200, 200, 200)); final RGB current = JFaceResources.getColorRegistry().getRGB(ComponentLabelProvider.NOT_RENDERED_KEY); - if (current == null || !current.equals(color)) { - JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_RENDERED_KEY, - StringConverter.asRGB(color, new RGB(200, 200, 200))); + if (current == null || !current.equals(prefColor)) { + JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_RENDERED_KEY, prefColor); } if (viewer != null) { @@ -1343,13 +1343,13 @@ public class ModelEditor implements IGotoObject { @Inject public void setNotVisibleRenderedColor( - @Preference(ModelEditorPreferences.NOT_VISIBLE_AND_RENDERED_COLOR) String color) { + @Preference(ModelEditorPreferences.NOT_VISIBLE_AND_RENDERED_COLOR) String prefColorText) { + RGB prefColor = StringConverter.asRGB(prefColorText, new RGB(200, 200, 200)); final RGB current = JFaceResources.getColorRegistry() .getRGB(ComponentLabelProvider.NOT_VISIBLE_AND_RENDERED_KEY); - if (current == null || !current.equals(color)) { - JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_VISIBLE_AND_RENDERED_KEY, - StringConverter.asRGB(color, new RGB(200, 200, 200))); + if (current == null || !current.equals(prefColor)) { + JFaceResources.getColorRegistry().put(ComponentLabelProvider.NOT_VISIBLE_AND_RENDERED_KEY, prefColor); } if (viewer != null) { |