Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 71406 - [rulers] request for click & event modifiers from ruler annotations
Summary: [rulers] request for click & event modifiers from ruler annotations
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 47099
Blocks: 41544 346615
  Show dependency tree
 
Reported: 2004-08-04 14:58 EDT by Darin Wright CLA
Modified: 2012-02-22 12:40 EST (History)
3 users (show)

See Also:


Attachments
Fix (2.02 KB, patch)
2011-05-20 10:50 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2004-08-04 14:58:08 EDT
The debugger would like to be able to register for "shift-click" and "alt-
click" events on breakpoints in the editor ruler. This way we can implement 
features such as enable/disable in the ruler and "show breakpoint properties" 
via mouse clicks, rather than having to display the context menu.
Comment 1 Dani Megert CLA 2004-08-05 03:50:53 EDT
Having better notifications is a good idea. First step has been done for
annotation roll-overs (see: IVerticalRulerListener).

Note: Alt is not a good choice (at least on Windows) since it activates the menu
to enter a mnemonic.
Comment 2 Markus Keller CLA 2011-05-20 10:49:19 EDT
org.eclipse.ui.texteditor.AbstractTextEditor.getRulerMouseListener().new MouseListener() {...}.triggerAction(String) should just call
    action.runWithEvent(event)
to pass the event that contains the right stateMask.

Then e.g. the RulerToggleBreakpointActionDelegate#runWithEvent(IAction, Event) can stop swallowing the event and the blocked bug 41544 and bug 346615 can be implemented.
Comment 3 Markus Keller CLA 2011-05-20 10:50:41 EDT
Created attachment 196226 [details]
Fix
Comment 4 Dani Megert CLA 2011-05-23 05:13:08 EDT
Looks good to me. The only problem is that it is not easy discoverable. That would be possible if bug 87232 got fixed.
Comment 5 Dani Megert CLA 2011-05-23 05:14:32 EDT
(In reply to comment #4)
> That would be possible if bug 87232 got fixed.
Bug 47099 is closer.
Comment 6 Dani Megert CLA 2011-05-23 05:15:24 EDT
... but we should not wait for that.
Comment 7 Markus Keller CLA 2012-01-23 10:02:50 EST
Fixed with commit 2950f3b6ea5816ee027b081bddb27f7c24b54b4c.
Comment 8 Markus Keller CLA 2012-01-23 10:04:21 EST
.
Comment 9 Markus Keller CLA 2012-02-22 12:40:27 EST
I've released two follow-up commits to complete the story:
- http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=2a1572b6efb0f94f98826581c80e4fd605f30894
- http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=6c3a7b4301f75433ebbd03ae094935aa066f48ed

Fixes:
- Event#type is now set
- Events are also sent for clicks in the Java Editor's expansion hover (Preferences > Java > Editor > Hover).