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

Bug 481818

Summary: [rulers] Annotation in vertical ruler not on the wrapped line
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: TextAssignee: Andrey Loskutov <loskutov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, markus.kell.r
Version: 4.6   
Target Milestone: 4.6 M4   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=481819
https://git.eclipse.org/r/61706
https://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=3ed1845ebd7446875f59a4b229c203bfcf13bff6
Whiteboard:
Bug Depends on: 35779    
Bug Blocks:    
Attachments:
Description Flags
example of annotations, bookmark, quickdiff etc on wrapped text none

Description Dani Megert CLA 2015-11-10 05:09:11 EST
I20151110-0800.

The annotation in the vertical ruler is not on the wrapped line.


If we have this:

1 ABC DEF GHI JKL MNO PQR STU VWX YZ
2 ABC DEF GHI JKL MNO PQR STU VWX YZ
3 ABC DEF GHI JKL MNO PQR STU VWX YZ

and add a bookmark (Edit > Add Bookmark...) on VWX on line 2 and then shrink the editor when in word wrap, it will not show the bookmark on the wrapped line where VWX is.
Comment 1 Andrey Loskutov CLA 2015-11-10 05:22:39 EST
Dani, if someone else would be the reporter, I would close it as "won't fix" :-)

The bookmarks have no offset information, they always point to the single line, see AddMarkerAction.

So are you requesting an enhancement here?
Comment 2 Dani Megert CLA 2015-11-10 08:58:49 EST
(In reply to Andrey Loskutov from comment #1)
> Dani, if someone else would be the reporter, I would close it as "won't fix"
> :-)
> 
> The bookmarks have no offset information, they always point to the single
> line, see AddMarkerAction.

This is the ruler action which adds a line marker. You have to use the steps I provided i.e. use
Edit > Add Bookmark...
Comment 3 Markus Keller CLA 2015-11-11 11:52:15 EST
And bookmarks are just one example. Same problem for

- problem annotations, e.g. the "value of parameter is not used" problem in a Java editor:

    void methodWithAVeryLongName(int unusedParameter) {
        System.out.println(1);
    }

- quick diff annotations (colored ruler background should span all visual lines of a wrapped document line)
Comment 4 Andrey Loskutov CLA 2015-12-01 16:07:23 EST
Created attachment 258400 [details]
example of annotations, bookmark, quickdiff etc on wrapped text

Upcoming patch should allow to see something like attached screenshot.
Comment 5 Eclipse Genie CLA 2015-12-01 16:24:58 EST
New Gerrit change created: https://git.eclipse.org/r/61706
Comment 6 Lars Vogel CLA 2015-12-07 14:26:21 EST
Dani, Andrey is this still planned for M4? If yes, please move back.