Bug 40889 - [rulers] Clicking in line number ruler should not trigger annotation ruler
Summary: [rulers] Clicking in line number ruler should not trigger annotation ruler
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 94943 141801 208298 (view as bug list)
Depends on:
Blocks: 230073 231316
  Show dependency tree
 
Reported: 2003-07-29 09:29 EDT by Davec CLA
Modified: 2008-12-04 11:14 EST (History)
4 users (show)

See Also:


Attachments
Bug Fix (3.17 KB, patch)
2007-06-10 23:41 EDT, Nikolay Botev CLA
no flags Details | Diff
fixes bug introduced by first patch (857 bytes, patch)
2007-06-30 05:49 EDT, Nikolay Botev CLA
no flags Details | Diff
Updated Patch (3.21 KB, patch)
2008-02-18 04:19 EST, Nikolay Botev CLA
no flags Details | Diff
Updated Patch (3.52 KB, patch)
2008-02-18 05:23 EST, Nikolay Botev CLA
no flags Details | Diff
updated patch (1.28 KB, patch)
2008-04-24 02:12 EDT, Nikolay Botev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Davec CLA 2003-07-29 09:29:29 EDT
Is it possible to turn off the hover popups when selecting multiple lines? I have line numbering turned on for my editors, and at times I would like to select entire lines of code (to delete, comment out, or cut/paste elsewhere). This works, by dragging the mouse down the line numbers on the left, but if there are errors or warnings that exist in the lines that I wish to highlight, it "jumps" to the underlined words. Disrupting the line selection. Making it very difficult to remove/comment multilines out. How do I turned that off?
Comment 1 Dani Megert CLA 2006-07-12 05:11:46 EDT
*** Bug 141801 has been marked as a duplicate of this bug. ***
Comment 2 Nikolay Botev CLA 2007-06-10 23:41:33 EDT
Created attachment 70801 [details]
Bug Fix

This fix is based on the behavior of the new folding ruler - org.eclipse.jface.text.source.projection.ProjectionRulerColumn

The ProjectionRulerColumn prevents mouse events from triggering the annotation ruler by overriding the org.eclipse.jface.text.source.AnnotationRulerColumn.isPropagatingMouseListener() method to return false.

Since the org.eclipse.jface.text.source.LineNumberRulerColumn.java does not inherit from AnnotationRulerColumn (maybe it should?) I simply replicated the relevant code to the LineNumberRulerColumn class. The central piece is the overridden addMouseListener() method of the Canvas object used by the LineNumberRulerColumn.

Hope this can make it in the Europa release. It is an extremely annoying bug and the fix is trivial, based on existing code and in my testing does not interfere with the default mouse behavior of the line number column (selecting lines and popup menu work).
Comment 3 Dani Megert CLA 2007-06-11 03:22:51 EDT
Will take a look for 3.4.
Comment 4 Dani Megert CLA 2007-06-12 10:10:17 EDT
*** Bug 94943 has been marked as a duplicate of this bug. ***
Comment 5 Nikolay Botev CLA 2007-06-12 10:34:15 EDT
just curious - why not 3.3.x? this is a small fix.

Comment 6 Dani Megert CLA 2007-06-12 10:35:53 EDT
3.3.x are maintenance releases to fix major bugs. The less changes the better.
Comment 7 Nikolay Botev CLA 2007-06-30 05:49:41 EDT
Created attachment 72809 [details]
fixes bug introduced by first patch

By replicating the behavior of the projection ruler, my previous patch introduces projection ruler bug 184255 into the line number ruler. This patch is one way to fix the problem on windows but might not be the best solution. See the comments in bug 184255 for details.
Comment 8 Nikolay Botev CLA 2008-02-18 04:19:14 EST
Created attachment 89960 [details]
Updated Patch

updated patch against HEAD as of 2008-02-18
Comment 9 Nikolay Botev CLA 2008-02-18 05:23:18 EST
Created attachment 89963 [details]
Updated Patch

Updated patch that does not rely solely on the SWT.NO_FOCUS flag (which is only a hint) for proper focus behavior (maintain focus on text widget). Same type of fix as in bug 184255.
Comment 10 Dani Megert CLA 2008-02-27 03:02:38 EST
Will review during M7.
Comment 11 Dani Megert CLA 2008-04-23 12:11:54 EDT
The patch collides with the other patch I committed for the LineNumberRuler. No promise though that it makes it into 3.4 (depends on its changes).
Comment 12 Nikolay Botev CLA 2008-04-24 02:12:26 EDT
Created attachment 97364 [details]
updated patch

here is the correct patch against HEAD.

i sure hope this gets into 3.4. this is the most annoying bug for me personally, with the biggest nuisance factor out of all bugs i fixed so far.
Comment 13 Dani Megert CLA 2008-04-24 03:15:01 EDT
>this is the most annoying bug for me personally,
Wow, you must be very happy with Eclipse ;-)
Comment 14 Nikolay Botev CLA 2008-04-25 01:38:17 EDT
 (In reply to comment #13)
> >this is the most annoying bug for me personally,
> Wow, you must be very happy with Eclipse ;-)
OK, I did not express myself correctly, I meant the most annoying _out of the 5 bugs I submitted patches for thus far_.

I do love Eclipse though for how easy it is to go in and fix and test many issues without needing a heavyweight background of comprehensive understanding of the entire platform.
Comment 15 Dani Megert CLA 2008-04-25 10:31:26 EDT
Patch looks good, thanks!

Committed to HEAD.
Available in builds > N20080424-2000.
Comment 16 Markus Keller CLA 2008-12-04 11:14:30 EST
*** Bug 208298 has been marked as a duplicate of this bug. ***