Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2006-11-02 18:07:50 +0000
committerDani Megert2006-11-02 18:07:50 +0000
commit5dae0986665d9603ceed2d6a3dbdeea8dadc05e0 (patch)
treec8e8ba0edf9485a04698ac2c95a07da1407c392b
parent0188ecf0ceaff877aee88b7041c143ddea27b93e (diff)
downloadeclipse.platform.text-5dae0986665d9603ceed2d6a3dbdeea8dadc05e0.tar.gz
eclipse.platform.text-5dae0986665d9603ceed2d6a3dbdeea8dadc05e0.tar.xz
eclipse.platform.text-5dae0986665d9603ceed2d6a3dbdeea8dadc05e0.zip
Backported bug 161483.
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
index b70ff7734..082f25fe4 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
@@ -908,7 +908,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
new Throwable().printStackTrace(System.out);
}
- // TODO posting here is a problem for annotations that are being
+ // XXX: posting here is a problem for annotations that are being
// removed and the positions of which are not updated to document
// changes any more. If the document gets modified between
// now and running the posted runnable, the position information
@@ -1270,8 +1270,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
int firstWidgetLine= fTextWidget.getLineAtOffset(widgetClippingStartOffset);
widgetOffset= fTextWidget.getOffsetAtLine(firstWidgetLine);
} catch (IllegalArgumentException x) {
- // should not happen
- widgetOffset= 0;
+ widgetOffset= getInclusiveTopIndexStartOffset();
}
int widgetEndOffset;
@@ -1280,9 +1279,9 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
int lastWidgetLine= fTextWidget.getLineAtOffset(widgetClippingEndOffset);
widgetEndOffset= fTextWidget.getOffsetAtLine(lastWidgetLine + 1);
} catch (IllegalArgumentException x) {
- // happens if the editor is not "full", eg. the last line of the document is visible in the editor
+ // happens if the editor is not "full", e.g. the last line of the document is visible in the editor
// in that case, simply use the last character
- widgetEndOffset= fTextWidget.getCharCount();
+ widgetEndOffset= getExclusiveBottomIndexEndOffset();
}
IRegion clippingRegion= getModelRange(widgetOffset, widgetEndOffset - widgetOffset);

Back to the top