| Summary: | [projection] ProjectionMapping.toImageLine is wrong for projections at the end of the document | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Anton Leherbauer <aleherb+eclipse> | ||||
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> | ||||
| Status: | CLOSED INVALID | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | ||||||
| Version: | 3.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Anton Leherbauer
Created attachment 54254 [details]
Adding test9c to ProjectionMappingTest
Patch against current HEAD (20061121).
The original offset that directly follows the last fragment is counted to said fragment. Changing this would break all existing code. Do you have an example where the current code gives trouble? The WhitespaceCharacterPainter checks for folded lines by testing whether the next model line is mapped to -1. This works for all projections, but those that cover the last line of the document. In the Java editor it is practically impossible (I think) to create a folding at the end, because top-level classes are not foldable and comments afterwards are'nt either. In the CDT editor such projections are possible and in this case the whitespace painter considers the line as not folded. If you find a patch that doesn't break the current assumptions I'm happy to accept it ;-) I am withdrawing this bug because ProjectionMapping does not have the necessary information to make the decision whether a projection represents the end of the (master-)document or not. See also bug 301023. |