diff options
author | Lars Vogel | 2020-07-23 10:39:26 +0000 |
---|---|---|
committer | Lars Vogel | 2020-07-23 11:06:20 +0000 |
commit | eb65eca6e06e5eef7b126a07fa8319dc46e0bd66 (patch) | |
tree | 5db49de9cc2650ee4cbe510eefff67881a9ae556 | |
parent | 1b4aecc4e1187a02bf9c9c33e81231fc6a771d86 (diff) | |
download | eclipse.platform.text-eb65eca6e06e5eef7b126a07fa8319dc46e0bd66.tar.gz eclipse.platform.text-eb65eca6e06e5eef7b126a07fa8319dc46e0bd66.tar.xz eclipse.platform.text-eb65eca6e06e5eef7b126a07fa8319dc46e0bd66.zip |
Bug 565208: Remove calls to Color.dispose
Change for
org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
Change-Id: Id47bed57ba52b6c4bfba0d8b1062bacb930e639a
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java index ee8b627cce1..36fe3ff9a5b 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java @@ -87,12 +87,6 @@ public abstract class AbstractInformationControl implements IInformationControl, * @since 3.4.2 */ private Font fStatusLabelFont; - /** - * Color for the label in the status line or <code>null</code> if none. - * - * @since 3.6 - */ - private Color fStatusLabelForeground; /** The toolbar manager used by the toolbar or <code>null</code> if none. */ private final ToolBarManager fToolBarManager; /** Status line toolbar or <code>null</code> if none. */ @@ -517,10 +511,6 @@ public abstract class AbstractInformationControl implements IInformationControl, fStatusLabelFont.dispose(); fStatusLabelFont= null; } - if (fStatusLabelForeground != null) { - fStatusLabelForeground.dispose(); - fStatusLabelForeground= null; - } } @Override @@ -635,11 +625,8 @@ public abstract class AbstractInformationControl implements IInformationControl, private void setStatusLabelColors(Color foreground, Color background) { if (foreground == null || background == null) return; - if (fStatusLabelForeground != null) { - fStatusLabelForeground.dispose(); - } - fStatusLabelForeground = new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f)); - fStatusLabel.setForeground(fStatusLabelForeground); + Color statusLabelForeground= new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f)); + fStatusLabel.setForeground(statusLabelForeground); fStatusLabel.setBackground(background); } |