Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2020-02-18 08:28:08 +0000
committerAndrey Loskutov2020-02-18 08:28:08 +0000
commit8994bae2444db3e4711f0bf2a07519b65e63d79b (patch)
tree89cf3bbcf88a9780d02ab413b694a5a303c9d21d
parent811f8c8b6f1df4f8d156553f8a32e787177c8500 (diff)
downloadeclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.tar.gz
eclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.tar.xz
eclipse.platform.text-8994bae2444db3e4711f0bf2a07519b65e63d79b.zip
InlinedAnnotationSupport$UpdateStylesWidth.applyTextPresentation Added null check for ISourceViewer.getAnnotationModel() return value that allowed to be null. Change-Id: Ib0ffbbd3cdec18dc24a0c9de4a8c32ab8f24abe7 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
index c74ff5ea951..6682ad74e79 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
@@ -103,6 +103,9 @@ public class InlinedAnnotationSupport {
@Override
public void applyTextPresentation(TextPresentation textPresentation) {
IAnnotationModel annotationModel= fViewer.getAnnotationModel();
+ if (annotationModel == null) {
+ return;
+ }
IRegion region= textPresentation.getExtent();
((IAnnotationModelExtension2) annotationModel)
.getAnnotationIterator(region.getOffset(), region.getLength(), true, true)

Back to the top