diff options
author | Lars Vogel | 2020-08-06 08:09:39 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-08-06 08:36:40 +0000 |
commit | 94ce09169c1c120c1c67412a581aef0c8ec6187b (patch) | |
tree | 68302f1abdc2cb00a2913a9d5d09072f2e1aff8c | |
parent | 49f6874448bc0310931b285f81ae68321386ebae (diff) | |
download | eclipse.platform.text-94ce09169c1c120c1c67412a581aef0c8ec6187b.tar.gz eclipse.platform.text-94ce09169c1c120c1c67412a581aef0c8ec6187b.tar.xz eclipse.platform.text-94ce09169c1c120c1c67412a581aef0c8ec6187b.zip |
Bug 565208: Remove calls to Color.dispose
Change-Id: Ib76ba1c77774832f4ef1303d29dd3cdee56fb27e
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java index 4edf9d887b7..73cc24675d7 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/DefaultHyperlinkPresenter.java @@ -91,8 +91,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin private boolean fIsUsingNativeLinkColor; /** The link color specification. May be <code>null</code>. */ private RGB fRGB; - /** Tells whether to dispose the color on uninstall. */ - private boolean fDisposeColor; /** The currently active region. */ private IRegion fActiveRegion; /** The currently active style range as position. */ @@ -109,7 +107,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin */ public DefaultHyperlinkPresenter(IPreferenceStore store) { fPreferenceStore= store; - fDisposeColor= true; } /** @@ -130,7 +127,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin */ public DefaultHyperlinkPresenter(RGB color) { fRGB= color; - fDisposeColor= true; } @Override @@ -194,8 +190,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin document.removeDocumentListener(this); if (fColor != null) { - if (fDisposeColor) - fColor.dispose(); fColor= null; } @@ -218,8 +212,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin public void setColor(Color color) { Assert.isNotNull(fTextViewer); Assert.isTrue(fPreferenceStore == null, "Cannot set color if preference store is set"); //$NON-NLS-1$ - if (fColor != null && fDisposeColor) - fColor.dispose(); fColor= color; } @@ -350,8 +342,6 @@ public class DefaultHyperlinkPresenter implements IHyperlinkPresenter, IHyperlin @Override public void propertyChange(PropertyChangeEvent event) { if (HYPERLINK_COLOR.equals(event.getProperty())) { - if (fColor != null && fDisposeColor) - fColor.dispose(); fColor= createColorFromPreferenceStore(); return; } |