Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-07-24 08:46:32 -0400
committerLars Vogel2020-07-31 05:31:52 -0400
commit2098f96974e025c74abc2fd6214ef5e9e0912aee (patch)
tree94b0eac6912e3691e4fff6b10ffe8eeb404fba7b
parent32620a12c9634ebd1b0aed89a30d5ac1ac168aa6 (diff)
downloadeclipse.platform.text-2098f96974e025c74abc2fd6214ef5e9e0912aee.tar.gz
eclipse.platform.text-2098f96974e025c74abc2fd6214ef5e9e0912aee.tar.xz
eclipse.platform.text-2098f96974e025c74abc2fd6214ef5e9e0912aee.zip
[Bug 565465] Remove ISharedTextColors#dispose for colorsI20200731-0520
Change-Id: Ic318c0aef9fc05f3d88602657a6426467dcbaa4e Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java11
2 files changed, 3 insertions, 12 deletions
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
index a8bd472b2..1eeaeb8c4 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
@@ -98,10 +98,6 @@ public class CodeMiningProjectionViewerTest {
public Color getColor(RGB rgb) {
return null;
}
-
- @Override
- public void dispose() {
- }
});
projectionSupport.install();
fViewer.doOperation(ProjectionViewer.TOGGLE);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
index 7cf7550c0..f02ce7676 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
@@ -92,14 +92,9 @@ class SharedTextColors implements ISharedTextColors {
* @since 3.3
*/
private void dispose(Map<RGB, Color> colorTable) {
- if (colorTable == null)
- return;
-
- Iterator<Color> iter= colorTable.values().iterator();
- while (iter.hasNext())
- iter.next().dispose();
-
- colorTable.clear();
+ if (colorTable != null) {
+ colorTable.clear();
+ }
}
}

Back to the top