Bug 565208: Remove calls to Color.dispose
As these calls are no longer needed, remove the calls
and related code around such dispose that is also
now redundant.
Change-Id: If836406680f975e9c30c2507c7c5cbe7bb3c8fc2
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
index 07a22da..7c3b1b3 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java
@@ -139,18 +139,6 @@
*/
@Override
public void dispose() {
- if (colorPrivate != null) {
- colorPrivate.dispose();
- }
- if (colorProtected != null) {
- colorProtected.dispose();
- }
- if (colorPublic != null) {
- colorPublic.dispose();
- }
- if (colorOther != null) {
- colorOther.dispose();
- }
}
/* (non-Javadoc)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDISourceViewer.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDISourceViewer.java
index da2022e..4489b83 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDISourceViewer.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDISourceViewer.java
@@ -170,18 +170,12 @@
? null
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, styledText.getDisplay());
styledText.setForeground(color);
- if (getForegroundColor() != null) {
- getForegroundColor().dispose();
- }
setForegroundColor(color);
color= store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
? null
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
styledText.setBackground(color);
- if (getBackgroundColor() != null) {
- getBackgroundColor().dispose();
- }
setBackgroundColor(color);
}
}
@@ -285,11 +279,9 @@
setFont(null);
}
if (getBackgroundColor() != null) {
- getBackgroundColor().dispose();
setBackgroundColor(null);
}
if (getForegroundColor() != null) {
- getForegroundColor().dispose();
setForegroundColor(null);
}
if (fStore != null) {