]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.ui.editor/src/org/simantics/scl/ui/editor/SharedTextColors.java
(refs #7219) Remove deprecated code (scl.compiler.dummy and editor)
[simantics/platform.git] / bundles / org.simantics.scl.ui.editor / src / org / simantics / scl / ui / editor / SharedTextColors.java
diff --git a/bundles/org.simantics.scl.ui.editor/src/org/simantics/scl/ui/editor/SharedTextColors.java b/bundles/org.simantics.scl.ui.editor/src/org/simantics/scl/ui/editor/SharedTextColors.java
deleted file mode 100644 (file)
index f5c71dc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.simantics.scl.ui.editor;
-
-import gnu.trove.map.hash.THashMap;
-
-import org.eclipse.jface.text.source.ISharedTextColors;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-final class SharedTextColors implements ISharedTextColors {
-
-    Display display;
-    THashMap<RGB,Color> map = new THashMap<RGB,Color>();
-    
-    public SharedTextColors(Display display) {
-        this.display = display;
-    }
-
-    @Override
-    public Color getColor(RGB rgb) {
-        Color color = map.get(rgb);
-        if(color == null) {
-            color = new Color(display, rgb);
-            map.put(rgb, color);
-        }
-        return color;
-    }
-
-    @Override
-    public void dispose() {
-        for(Color color : map.values())
-            color.dispose();
-        map.clear();
-    }
-}
\ No newline at end of file