diff options
author | angelozerr | 2018-03-07 10:59:00 +0000 |
---|---|---|
committer | angelozerr | 2018-03-07 10:59:00 +0000 |
commit | 7a590042e91460c3d55c6d89dbcfad60fca599b5 (patch) | |
tree | ab2fb5c0aa191fdd85f56a1d8768cdd4a490486a | |
parent | 5c81b44cc8388a70cdacd82f0f567fd5b6f8e1b0 (diff) | |
download | eclipse.platform.text-7a590042e91460c3d55c6d89dbcfad60fca599b5.tar.gz eclipse.platform.text-7a590042e91460c3d55c6d89dbcfad60fca599b5.tar.xz eclipse.platform.text-7a590042e91460c3d55c6d89dbcfad60fca599b5.zip |
Bug 532107 - [CodeMining] Bug with "visibles" inlined annotations in nonS4_8_0_M6I20180308-0630I20180307-2000I20180307-1025I20180307-0900I20180307-0825I20180307-0800
UI Thread
Change-Id: Ifc9a19dc2c4e162243ccc3c23a90562874890e0d
Signed-off-by: angelozerr <angelo.zerr@gmail.com>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java | 7 |
1 files changed, 6 insertions, 1 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 8bb1e7a5598..ee972ce0175 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 @@ -210,7 +210,12 @@ public class InlinedAnnotationSupport implements StyledTextLineSpacingProvider { @SuppressWarnings("boxing") boolean isInVisibleLines(int offset) { if (endOffset == null) { - endOffset= getExclusiveBottomIndexEndOffset(); + Display display= fViewer.getTextWidget().getDisplay(); + if (display.getThread() == Thread.currentThread()) { + endOffset= getExclusiveBottomIndexEndOffset(); + } else { + display.syncExec(() -> endOffset= getExclusiveBottomIndexEndOffset()); + } } return offset >= startOffset && offset <= endOffset; } |