diff options
author | azerr | 2018-04-15 22:19:39 +0000 |
---|---|---|
committer | azerr | 2018-04-15 22:19:39 +0000 |
commit | a42dd798672ddf63a522143008dd5e1435849c08 (patch) | |
tree | 2d35d56999ca796b2b45fe16e344c081071aa6da | |
parent | 2137b10f5fa34ac875370405f798b8a8f3550f61 (diff) | |
download | eclipse.platform.text-I20180416-0305.tar.gz eclipse.platform.text-I20180416-0305.tar.xz eclipse.platform.text-I20180416-0305.zip |
Bug 533591 - [code mining] Inlined annotation support must removeI20180416-2000I20180416-0305
annotations when it is uninstalled
Change-Id: Ic77d99f31ae60fc3fcc592b990e1809d4515b256
Signed-off-by: azerr <angelo.zerr@gmail.com>
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java | 19 |
1 files changed, 10 insertions, 9 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 bda03cbd092..2115c3132ae 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 @@ -329,7 +329,7 @@ public class InlinedAnnotationSupport { /** * Install the inlined annotation support for the given viewer. * - * @param viewer the source viewer + * @param viewer the source viewer * @param painter the annotation painter to use to draw the inlined annotations. */ public void install(ISourceViewer viewer, AnnotationPainter painter) { @@ -391,6 +391,7 @@ public class InlinedAnnotationSupport { visibleLines.uninstall(); visibleLines= null; } + removeInlinedAnnotations(); disposeFont(); fViewer= null; fPainter= null; @@ -520,7 +521,7 @@ public class InlinedAnnotationSupport { /** * Returns the {@link AbstractInlinedAnnotation} from the given line index and null otherwise. * - * @param viewer the source viewer + * @param viewer the source viewer * @param lineIndex the line index. * @return the {@link AbstractInlinedAnnotation} from the given line index and null otherwise. */ @@ -552,8 +553,8 @@ public class InlinedAnnotationSupport { * Returns the {@link AbstractInlinedAnnotation} from the given point and null otherwise. * * @param viewer the source viewer - * @param point the origin of character bounding box relative to the origin of the widget client - * area. + * @param point the origin of character bounding box relative to the origin of the widget + * client area. * @return the {@link AbstractInlinedAnnotation} from the given point and null otherwise. */ private static AbstractInlinedAnnotation getInlinedAnnotationAtPoint(ISourceViewer viewer, Point point) { @@ -569,8 +570,8 @@ public class InlinedAnnotationSupport { * otherwise. * * @param viewer the source viewer - * @param point the origin of character bounding box relative to the origin of the widget client - * area. + * @param point the origin of character bounding box relative to the origin of the widget + * client area. * @return the {@link AbstractInlinedAnnotation} line content from the given point and null * otherwise. */ @@ -595,8 +596,8 @@ public class InlinedAnnotationSupport { * otherwise. * * @param viewer the source viewer - * @param point the origin of character bounding box relative to the origin of the widget client - * area. + * @param point the origin of character bounding box relative to the origin of the widget + * client area. * @return the {@link AbstractInlinedAnnotation} line header from the given point and null * otherwise. */ @@ -648,7 +649,7 @@ public class InlinedAnnotationSupport { * Execute UI {@link StyledText} function which requires UI Thread. * * @param text the styled text - * @param fn the function to execute. + * @param fn the function to execute. */ static void runInUIThread(StyledText text, Consumer<StyledText> fn) { if (text == null || text.isDisposed()) { |