diff options
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor')
-rw-r--r-- | org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java | 68 | ||||
-rw-r--r-- | org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java | 1 |
2 files changed, 1 insertions, 68 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java index 22b270c3f7c..3456447c3f3 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java @@ -2378,26 +2378,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit */ private SelectionListener fSelectionListener; /** The editor's font. */ - private Font fFont; /** - * The editor's foreground color. - * @since 2.0 - */ - private Color fForegroundColor; - /** - * The editor's background color. - * @since 2.0 - */ - private Color fBackgroundColor; - /** - * The editor's selection foreground color. - * @since 3.0 - */ - private Color fSelectionForegroundColor; - /** - * The editor's selection background color. - * @since 3.0 - */ - private Color fSelectionBackgroundColor; + private Font fFont; /** * The find scope's highlight color. * @since 2.0 @@ -3932,32 +3913,18 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit : createColor(store, PREFERENCE_COLOR_FOREGROUND, styledText.getDisplay()); styledText.setForeground(color); - if (fForegroundColor != null) - fForegroundColor.dispose(); - - fForegroundColor= color; - // ---------- background color ---------------------- color= store.getBoolean(PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT) ? null : createColor(store, PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay()); styledText.setBackground(color); - if (fBackgroundColor != null) - fBackgroundColor.dispose(); - - fBackgroundColor= color; - // ----------- selection foreground color -------------------- color= store.getBoolean(PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT) ? null : createColor(store, PREFERENCE_COLOR_SELECTION_FOREGROUND, styledText.getDisplay()); styledText.setSelectionForeground(color); - if (fSelectionForegroundColor != null) - fSelectionForegroundColor.dispose(); - - fSelectionForegroundColor= color; // ---------- selection background color ---------------------- color= store.getBoolean(PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT) @@ -3965,10 +3932,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit : createColor(store, PREFERENCE_COLOR_SELECTION_BACKGROUND, styledText.getDisplay()); styledText.setSelectionBackground(color); - if (fSelectionBackgroundColor != null) - fSelectionBackgroundColor.dispose(); - - fSelectionBackgroundColor= color; } } @@ -3992,10 +3955,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit if (target != null && target instanceof IFindReplaceTargetExtension) ((IFindReplaceTargetExtension) target).setScopeHighlightColor(color); - if (fFindScopeHighlightColor != null) - fFindScopeHighlightColor.dispose(); - - fFindScopeHighlightColor= color; } } @@ -4335,31 +4294,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit disposeNonDefaultCaret(); fInitialCaret= null; - if (fForegroundColor != null) { - fForegroundColor.dispose(); - fForegroundColor= null; - } - - if (fBackgroundColor != null) { - fBackgroundColor.dispose(); - fBackgroundColor= null; - } - - if (fSelectionForegroundColor != null) { - fSelectionForegroundColor.dispose(); - fSelectionForegroundColor= null; - } - - if (fSelectionBackgroundColor != null) { - fSelectionBackgroundColor.dispose(); - fSelectionBackgroundColor= null; - } - - if (fFindScopeHighlightColor != null) { - fFindScopeHighlightColor.dispose(); - fFindScopeHighlightColor= null; - } - if (fFontPropertyChangeListener != null) { JFaceResources.getFontRegistry().removeListener(fFontPropertyChangeListener); if (fPreferenceStore != null) diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java index 6d4a5322c04..99da27488e9 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java @@ -80,7 +80,6 @@ public class InfoForm { fScrolledComposite.addDisposeListener(e -> { JFaceResources.getFontRegistry().removeListener(fPropertyChangeListener); fScrolledComposite = null; - fSeparatorColor.dispose(); fSeparatorColor = null; fHeader = null; fBanner = null; |