Bug 513709 - [breakpoints] Context menu entries for breakpoint are not consequent
Summary: [breakpoints] Context menu entries for breakpoint are not consequent
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-15 08:25 EDT by Bernhard Maehr CLA
Modified: 2017-04-12 10:55 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Maehr CLA 2017-03-15 08:25:09 EDT
The context menu entries for breakpoint are not consequent. If the breakpoint is not set, there is an enabled "Toggle Breakpoint" and a disabled "Disable Breakpoint". If the breakpoint is set, there is an enabled "Toggle Breakpoint" and an enabled "Disable Breakpoint".

If the breakpoint marker i not visible (e.g. because a warning in this line) it is  quite complicated to think 'Ok, the "Disabled Breakpoint" entry is disabled, that means, if I want to enable the breakpoint I need to click "Toggle Breakpoint".'  

Suggestion: If no breakpoint is set change the menu item to an enabled "Enable Breakpoint".
Comment 1 Sarika Sinha CLA 2017-03-17 02:33:46 EDT
Not sure, we can do it as people already using it will be confused.
Comment 2 Dani Megert CLA 2017-04-12 10:28:02 EDT
Suggest to close as wont fix.
Comment 3 Andrey Loskutov CLA 2017-04-12 10:41:40 EDT
(In reply to Bernhard Maehr from comment #0)
> Suggestion: If no breakpoint is set change the menu item to an enabled
> "Enable Breakpoint".

This will be more confusing, because user will see two differently named menu entries doing same thing. 

But what about: if NO breakpoint is set do NOT show "Disable breakpoint" menu at all?

This would require refactoring: the <action> contribution with the  id=org.eclipse.jdt.debug.ui.actions.EnableDisableBreakpointRulerActionDelegate should be moved from org.eclipse.ui.popupMenus extension point to org.eclipse.ui.menus and define the visibleWhen condition.
Comment 4 Dani Megert CLA 2017-04-12 10:43:47 EDT
(In reply to Andrey Loskutov from comment #3)
> (In reply to Bernhard Maehr from comment #0)
> > Suggestion: If no breakpoint is set change the menu item to an enabled
> > "Enable Breakpoint".
> 
> This will be more confusing, because user will see two differently named
> menu entries doing same thing. 
> 
> But what about: if NO breakpoint is set do NOT show "Disable breakpoint"
> menu at all?
> 
> This would require refactoring: the <action> contribution with the 
> id=org.eclipse.jdt.debug.ui.actions.EnableDisableBreakpointRulerActionDelegate
> should be moved from org.eclipse.ui.popupMenus extension point to
> org.eclipse.ui.menus and define the visibleWhen condition.

Note that the menus differ whether Debug is loaded or not.
Comment 5 Andrey Loskutov CLA 2017-04-12 10:47:19 EDT
(In reply to Dani Megert from comment #4)
> Note that the menus differ whether Debug is loaded or not.

What do you mean by that? If the debugger is running or not, or if the debug plugins are loaded or not? And which difference is there? I couldn't find any differences in the ruler menu.
Comment 6 Dani Megert CLA 2017-04-12 10:55:12 EDT
(In reply to Andrey Loskutov from comment #5)
> (In reply to Dani Megert from comment #4)
> > Note that the menus differ whether Debug is loaded or not.
> 
> What do you mean by that? If the debugger is running or not, or if the debug
> plugins are loaded or not?

The latter.


> And which difference is there? I couldn't find
> any differences in the ruler menu.

We don't load Debug when we open an editor. So, for example you won't see whether a breakpoint is enabled or not. Only when Debug is loaded it will show the real state. In the same line some menu items might be enabled even though not really applicable.