Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 7230 - Some tools actions are not correctly disabled if no node is activated.
Some tools actions are not correctly disabled if no node is activated.
Product: projects
Classification: Unclassified
Component: Generic Infrastructure
All All
: P1 (vote)
Assigned To: Martin Ryzl
Depends on:
  Show dependency treegraph
Reported: 2000-08-02 09:44 UTC by iformanek
Modified: 2003-07-01 14:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 2000-08-02 09:44:37 UTC
This happens either on the first startup or if I go to explorer, and deselect
any selected nodes. Next, in the Tools menu, there are 2 actions: "Add to
Project" and "Update parser database" which do not work.

This is especially annoying for the first time users, who start the ide for the
first time and go to see what are the menu items, and these two are erratical.
Comment 1 iformanek 2000-08-02 10:02:59 UTC
The enable() methods in these actions do not check for empty array of activated
nodes, and return true in such case:
    (from Editor's JCUpdateAction)
    protected boolean enable(Node[] activatedNodes) {
        boolean ok = true;
        for (int i = 0; i < activatedNodes.length; i++) {
            if (activatedNodes[i].getCookie(DataFolder.class) == null) {
                ok = false;
        return ok;

These are really 2 separate bugs - one in Projects, on in Editor module, but as
the fix is simple, will keep both here.
Comment 2 Miloslav Metelka 2000-08-02 10:14:59 UTC
I have partly fixed this bug by fixing the editor part in JCUpdateAction.
Comment 3 Jaroslav Tulach 2000-08-02 17:36:59 UTC
Martin can you fix the "Add to project" action?
Comment 4 Quality Engineering 2003-07-01 14:17:43 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo