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 36387 - Popup menu actions in debugger views are not enabled
Summary: Popup menu actions in debugger views are not enabled
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: REGRESSION
Depends on: 36315
Blocks:
  Show dependency tree
 
Reported: 2003-10-01 16:06 UTC by Milan Kubec
Modified: 2003-12-11 14:20 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Demo that activatedNodes on a nested TC must be set (internal exec) - should print false / false (4.08 KB, text/plain)
2003-10-17 11:49 UTC, Jesse Glick
Details
Patch which caused the regression (2.98 KB, patch)
2003-10-17 11:52 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2003-10-01 16:06:54 UTC
Finish action is not enabled in popup menu on
running session in Sessions view in Debugger
Window. It's regression and automated tests are
failing on it.
Comment 1 Milan Kubec 2003-10-01 16:29:51 UTC
The latest build where I can reproduce this issue is dev-200309250100.
Comment 2 Milan Kubec 2003-10-13 09:39:49 UTC
Is there any activity around this issue? It would be highly
appreciated, since automated tests are failing due to this issue.
Thanks for (at least) evaluation.
Comment 3 Jan Jancura 2003-10-13 14:29:47 UTC
This bug is caused by some regression (incompatible change) in
openide/actions.
Can you look on this Jesee, please?
May be that the problem is in hackly implementation of DebuggerWindow,
but in all cases some incompatibility is there.
Comment 4 Jesse Glick 2003-10-13 14:37:43 UTC
Reassign back to me if it's my regression, but I do not own actions.
Comment 5 Milan Kubec 2003-10-15 12:49:34 UTC
Not only 'Finish' action but also some other actions such as  'Make
curent', 'Create Fixed Watch', 'Delete All', 'Disable All', 'Enable All'.
Comment 6 Peter Zavadsky 2003-10-15 13:05:32 UTC
I don't have a time to investigate debugger actions implementations.

Other actions works fine, so I guess the problem should be in
debugger. Please provide detailed info why your actions are not
working first and if you think the problem is in openide/actions
provide also the details and just then assign here.
Comment 7 _ tboudreau 2003-10-15 16:53:56 UTC
There was a similar problem last week with the execution window -
David Konecny did something to fix it.  Possibly related?
Comment 8 Jiri Skrivanek 2003-10-16 18:31:04 UTC
Please, fix it ASAP because this issue is Q-build stopper.
Comment 9 Jesse Glick 2003-10-16 20:10:45 UTC
Well actually I don't know why this would have worked *before*, since
the code in debuggercore is wrong. The situation:

FinishSessionAction is a CookieAction, requiring SessionCookie.

SessionNode implements SessionCookie, and (redundantly and
unnecessarily) adds itself to its own CookieSet.

SessionNode.lookup.lookup(SessionCookie.class) should give itself, as
expected.

Now FSA, as is usual, tries to make a context-aware instance. To do
this it searches up the component hierarchy to find a Lookup.Provider
instance which can supply its context.

The first one it finds is a SessionsView, which is a kind of
TreeTableExplorerViewSupport.

TTEVS implements ExplorerManager.Provider, and it is a TopComponent.
TC impl L.P, and the default impl (not overridden here) delegates to
the activated nodes. Since TTEVS, unlike e.g. ExplorerPanel, does
*not* listen to changes in the ExplorerManager and update the
activatedNodes correspondingly, aN is always null. Therefore
TTEVS.lookup contains only its ActionMap, no Node instances; therefore
 FSA is disabled.

Should be simple to fix.

I am not aware of any incompatibility here; if this code worked
before, it was surely accidental.
Comment 10 Jesse Glick 2003-10-16 20:34:54 UTC
Fixed in
debuggercore/src/org/netbeans/modules/debugger/support/nodes/TreeTableExplorerViewSupport.java
rev. 1.17. Responsibility of debuggercore owner to merge to Q-build
branch if that is desired.
Comment 11 Milan Kubec 2003-10-17 09:04:31 UTC
Please leave a message when fixed in Q-build branch. Thanks.
Comment 12 Jan Jancura 2003-10-17 09:22:52 UTC
Integrated to QBE200310150100.

Thank you for your help, Jesse.
Comment 13 Jesse Glick 2003-10-17 11:48:02 UTC
Sure... I am still curious where the regression comes from, though, if
it is in fact in openide. I can't find any applicable changes in CVS
from around that time.

One thing to note is that DebuggerWindow contains the SessionsView
(etc.) and *does* have activatedNodes, set correctly. Nonetheless, the
context for the actions is the first Lookup.Provider, which is the
SessionsView, so the activatedNodes on any parent component is not
relevant. Thinking this might be an incompatibility, I made up a test
case (attaching), but it behaves the same in NB 3.5.1 as in a dev build.
Comment 14 Jesse Glick 2003-10-17 11:49:00 UTC
Created attachment 11893 [details]
Demo that activatedNodes on a nested TC must be set (internal exec) - should print false / false
Comment 15 Jesse Glick 2003-10-17 11:52:30 UTC
Created attachment 11894 [details]
Patch which caused the regression
Comment 16 Jesse Glick 2003-10-17 11:55:01 UTC
The regression was in debuggercore, not openide. Next time check your
own CVS logs please!

msandor tried to remove a usage of ExplorerPanel, now deprecated.
Unfortunately the deprecation message for ExplorerPanel points to
ExplorerManager, which gives an incorrect suggestion - see issue #36315.
Comment 17 Milan Kubec 2003-10-23 09:25:18 UTC
Verified in dev-200310230100.