This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46751 - Can't toggle breakpoint in java sources after switch to JSP
Summary: Can't toggle breakpoint in java sources after switch to JSP
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
: 46330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-29 16:38 UTC by zikmund
Modified: 2006-03-24 10:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2004-07-29 16:38:42 UTC
Build 200407281800

1) Have a WebApp with a JSP and a java source (in
WebApp or in different project - both fail)
2) Open java source
3) Open JSP file
4) Switch back to java source
5) Toggle breakpoint in java source
6) ERROR:
Toggling has no effect until you close the editor
window or you switch to different non-editor
window (as Projects/Breakpoints etc.)
BTW: Toggling breakpoints in JSPs work fine

BTW: It happens quite often while developing
WebApps, but it took me several days to find out a
reproducible case (it seems like random behaviour
for the first time).
Comment 1 Martin Grebac 2004-07-30 08:00:22 UTC
Thanks for the report. I've seen this once or twice, but was not able
to reproduce. Will look at it.
Comment 2 Martin Grebac 2004-07-30 10:58:27 UTC
The current approach to action sharing doesn't work well. The problem
is that the last toggle action provider updates the state of the 
ActionsManager.ACTION_TOGGLE_BREAKPOINT action - so from the usecase
when you switch in editor from jsp to java, first jpda
ToggleBreakpointActionProvider is called and sets the action to
ENABLED, then JspToggleBreakpointActionProvider is called and sets the
action to DISABLED.

Same for other shared actions, so raising to P2.
Comment 3 Jan Jancura 2004-08-02 15:46:22 UTC
1) I am not able to reproduce it now. So I can not verify the fix.
2) Fixed in the main trunk:

We should always ask all ActionProvider, is some of them changes its
enabled state. Should be fixed now.

QA: Test toggle breakpoint action and all other context sensitive
actions (Run to Cursor, step into)


Index: api/src/org/netbeans/api/debugger/ActionsManager.java
===================================================================
RCS file:
/cvs/debuggercore/api/src/org/netbeans/api/debugger/ActionsManager.java,v
retrieving revision 1.7
diff -r1.7 ActionsManager.java
258,259c258
<         final Object action, 
<         boolean enabled
---
>         final Object action
260a260
>         boolean enabled = isEnabled (action);
291c291
<         fireActionStateChanged (action, p.isEnabled (action));
---
>         fireActionStateChanged (action);
363c363
<             fireActionStateChanged (action, enabled);
---
>             fireActionStateChanged (action);
Comment 4 Jan Jancura 2004-08-04 16:44:19 UTC
*** Issue 46330 has been marked as a duplicate of this issue. ***
Comment 5 zikmund 2004-08-05 09:33:06 UTC
Verified.