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 30179 - Tools menuitem is missing when running automated tests
Summary: Tools menuitem is missing when running automated tests
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2003-01-16 15:02 UTC by Milan Kubec
Modified: 2008-12-22 23:11 UTC (History)
2 users (show)

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 Milan Kubec 2003-01-16 15:02:35 UTC
Tools menuitem is missing from pop-up menu on
nodes in Explorer when running automated tests in
xtest using Jemmy&Jelly. It causes number of tests
to fail.

Marian please, could you provide some links to
tests from core which can demonstrate the problem.
Thanks.
Comment 1 Milan Kubec 2003-01-20 09:46:36 UTC
[dev-200301200100] I was able to reproduce this issue by hand on
todays build. I created new project, then mounted folder and then I
wanted to add that *folder* to the project and there was no menu Tools
in pop-up menu. After opening pop-up menu on *file* menu Tools was there.
Comment 2 Marian Mirilovic 2003-01-23 12:52:36 UTC
It's 100% reproducible in the test runtime, and random by hand.
Comment 3 Peter Zavadsky 2003-01-27 13:28:19 UTC
Please let me know how it is with today's builds. 
The builds from last week had more serious problems with the actions.

And currently I can't reproduce it by hand, neither randomly.
Comment 4 Peter Zavadsky 2003-01-27 17:30:51 UTC
Finally I got to the reproducible steps:

1) First time you have to invoke popup on node, where the ToolsAction
will be disabled (i.e. all of its subactions are disabled)
in current NB build (without additional modules, like junit and
apissupport) it is FileSystems node.

2) Then when you try to invoke the popup on other nodes where the
ToolsAction should be enabled, you don't get the ToolsAction.

In sum if you invoke popup first time on node where the ToolsAction is
disabled (i.e. not seen), then you don't get the ToolsAction later
even invoking popup on other nodes.


Explanation of that behaviour:
 The ToolsAction is not seen in popup if all its subactions are
disabled, i.e. its popup presenter, which is JInlineMenu, don't show
the Tools sub menu item.

Later when invoking another popup, the new presenter of ToolsAcion is
asking whether the action has changed inbetween, i.e. whether the list
of sub action was changed (e.g. when you un/install some module), 
or if at least one of those actions changes its enablement status
(SystemAction!) and just in those case is the state of ToolsAction
rechecked.

When introduced context aware actions, in each invocation of popup the
ToolsAction could have different instances of subactions, thus it is
irrelevant to listen on their enablement status. So the above has
worked just for singleton SystemAction instances.


Comment 5 Peter Zavadsky 2003-01-28 10:17:57 UTC
Fixed in [trunk]

openide/../actions/ToolsAction.java 1.41

Note: when also tools menu will use the context (global) instances,
this will be necesary to rewrtite too.
Comment 6 Marian Mirilovic 2003-01-29 13:22:45 UTC
verified in [nb_dev](20030129)