Bug 533591 - [code mining] Inlined annotation support must remove
annotations when it is uninstalled
Change-Id: Ic77d99f31ae60fc3fcc592b990e1809d4515b256
Signed-off-by: azerr <angelo.zerr@gmail.com>
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 bda03cb..2115c31 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 @@
/**
* 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 @@
visibleLines.uninstall();
visibleLines= null;
}
+ removeInlinedAnnotations();
disposeFont();
fViewer= null;
fPainter= null;
@@ -520,7 +521,7 @@
/**
* 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 @@
* 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 @@
* 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 @@
* 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 @@
* 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()) {