Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangelozerr2017-12-18 09:22:41 -0500
committerMickael Istria2017-12-21 11:24:59 -0500
commitfbf48eb2c866c228064cd1e70e4164a19449eeac (patch)
treef45d387e6d25ac33c13348aa07449651e2905c1f /org.eclipse.ui.workbench.texteditor
parentb70fdcd63eab02c88bac2a93fb8cf73535b6fcbf (diff)
downloadeclipse.platform.text-fbf48eb2c866c228064cd1e70e4164a19449eeac.tar.gz
eclipse.platform.text-fbf48eb2c866c228064cd1e70e4164a19449eeac.tar.xz
eclipse.platform.text-fbf48eb2c866c228064cd1e70e4164a19449eeac.zip
Bug 528851 - [CodeMining] Problem while getting bad AnnotationPainter
(with JDT Editor) Change-Id: I04710e6a04d7bdcdd3a53869d3e0dacd6cbf99b6 Signed-off-by: angelozerr <angelo.zerr@gmail.com>
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
index b16c24648..9342f2c6e 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
@@ -40,6 +40,7 @@ import org.eclipse.jface.text.source.ICharacterPairMatcher;
import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.ISourceViewerExtension5;
import org.eclipse.jface.text.source.MatchingCharacterPainter;
@@ -826,6 +827,8 @@ public class SourceViewerDecorationSupport {
((ITextViewerExtension4)fSourceViewer).addTextPresentationListener(fAnnotationPainter);
ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
extension.addPainter(fAnnotationPainter);
+ if (fSourceViewer instanceof ISourceViewerExtension5)
+ ((ISourceViewerExtension5) fSourceViewer).setCodeMiningAnnotationPainter(fAnnotationPainter);
}
fAnnotationPainter.setAnnotationTypeColor(annotationType, getAnnotationTypeColor(annotationType));
Object decorationType= getAnnotationDecorationType(annotationType);

Back to the top