Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 140802

Summary: [painting][linked mode] IBeam decorations not drawn at end of file
Product: [Eclipse Project] Platform Reporter: Tom Hofmann <eclipse>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
AnnotationPainter.java.diff none

Description Tom Hofmann CLA 2006-05-09 10:40:36 EDT
3.2 RC3

IBeam decorations are not draw at the end of the file.

Steps:
- create an empty Java file
- type '"' -> the linked mode exit position should be drawn after the closing quote, but it is not

Reason: AnnotationPainter filters decorations that do not overlap with the range being redrawn. Since an IBeam decoration is drawn on the character region following the offset, which is after the document extent in this case, it is optimized away.

Fix (see also patch): The overlap predicates in AnnotationPainter should consider and document ranges as overlapping that truly overlap with *or touch* each other. This way, an IBeam decoration right at the end offset of the redraw range would still be considered.
Comment 1 Tom Hofmann CLA 2006-05-09 10:41:10 EDT
Created attachment 40729 [details]
AnnotationPainter.java.diff

Fixes the painting of IBeams at the document end.
Comment 2 Tom Hofmann CLA 2006-05-09 10:42:43 EDT
Not a 3.2 issue, as typing at the document end is not a very likely operation and the consequences of extending the overlap predicates are not overseeable.
Comment 3 Dani Megert CLA 2010-01-19 12:49:43 EST

*** This bug has been marked as a duplicate of bug 227534 ***