| Summary: | [misc] marker position selection not synchronised | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | David <fredgroup> |
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | 3.1.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
David
Fixed in HEAD. Available in builds > N20060320-0010. (In reply to comment #1) > Fixed in HEAD. > Available in builds > N20060320-0010. > I haven't tested version N20060320-0010 however I have downloaded the windows zip file and looked at the source code. The problem of selecting the text when you click on the Annotation in the ruler is still there. See org.eclipse.ui.texteditor.SelectMarkerRulerAction.run(). At the end of this function it still has // Select and reveal in editor int offset= MarkerUtilities.getCharStart(marker); int endOffset= MarkerUtilities.getCharEnd(marker); if (offset > -1 && endOffset > -1) fTextEditor.selectAndReveal(offset, endOffset - offset); i.e. It is NOT using the AnnotationModel position. Interestingly the TaskMarker Annotation selects different text depending if you have opened up the TaskViewer or not. I DO NOT like the "Hard coding" of if(problemMarker) or if(TaskMarker). I find code like this hard to use for my own "MyMarker". i.e. It behaves differently if it has TaskMarker as super or not. And this is with the AnnotationRuler code which I have no access to modify. What I've fixed is that the editor shows the new text in the hover. I misinterpreted the bug and did not touch SelectMarkerRulerAction. And of course you're right with "hard-coding" the marker type but that was needed up to now. I can now use MarkerViewUtil to fix this. Released to HEAD and will show up at latest in I20060329-1600. (In reply to comment #3) > What I've fixed is that the editor shows the new text in the hover. I > misinterpreted the bug and did not touch SelectMarkerRulerAction. > > And of course you're right with "hard-coding" the marker type but that was > needed up to now. I can now use MarkerViewUtil to fix this. > > Released to HEAD and will show up at latest in I20060329-1600. > Good. The SelectMarkerRulerAction is used for the editor of files with *.java or *.txt BUT not for the *.cpp. The editor for *.cpp doesn't highlight any selected text. You can file a bug against CDT: they have to register the action in their plugin.xml. Verified in I20060330-0010 in Java and Text editor with bookmarks and tasks. The code change which fixed the problem described in comment 0 had to be pulled out again because it caused bug 142170. All other changes discussed in comment 2 and onwards are still in. Note that the behavior reported in comment 0 is in since 1.0. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it and remove the stalebug whiteboard tag. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. - |