Bug 16686 - DCR: Please add "Quick Fix" to the breakpoint bar popup menu [quick fix]
Summary: DCR: Please add "Quick Fix" to the breakpoint bar popup menu [quick fix]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Tom Hofmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-05-21 16:34 EDT by Carolyn MacLeod CLA
Modified: 2003-09-16 06:21 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2002-05-21 16:34:45 EDT
20020521
The natural user action when presented with the cute little "light bulb" icon 
in the breakpoint bar is to try to right-click on the light bulb.
It would be really nice if "Quick Fix" was on the popup menu there.
(i.e. the same popup menu that has Add/Enable Breakpoints and Add Bookmark/Task)

This would probably be less of a "cognitive leap" for new users, and old users 
might find it handy too.  :)
Comment 1 Adam Kiezun CLA 2002-05-22 04:39:20 EDT
+1 from here
i entered that before
Comment 2 Erich Gamma CLA 2002-06-20 06:31:35 EDT
since F2 you can click on the light bulb directly. We will not add the action 
to the context menu for 2.0
Comment 3 Dirk Baeumer CLA 2002-07-24 05:29:17 EDT
Consider for 2.1
Comment 4 Kai-Uwe Maetzel CLA 2002-10-30 15:19:34 EST
You can just click on the icon. However, it should also appear in the menu.
Comment 5 Tom Hofmann CLA 2003-09-16 04:58:04 EDT
Easy to implement by putting sth. like the following into CompilationUnitEditor:

protected void rulerContextMenuAboutToShow(IMenuManager menu) {
	super.rulerContextMenuAboutToShow(menu);
	IAction action= getAction("CorrectionAssistProposal"); 
	if (action != null && action.isEnabled())
		addAction(menu, ITextEditorActionConstants.MB_ADDITIONS,
"CorrectionAssistProposal");
}

We'll need the following from the quick fix action (JDT UI): 

1) Real enablement code (should be possible, the menu entry should only be
present when a light bulb is showing) (We're not talking about the blue (quick
assist) lightbulb here).

2) A way to set the offset for which quick fix proposals are to be shown. At the
moment, JavaCorrectionAssistant takes the position from the viewer selection,
but when invoking from the ruler context menu, we'll want the relevant proposals
for the line where the marker is at / the context menu is opened for.

Martin, what do you think.

Comment 6 Tom Hofmann CLA 2003-09-16 06:21:55 EDT
fixed > 20030916