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.
http://openide.netbeans.org/servlets/ReadMsg?msgId=328967&listName=dev http://openide.netbeans.org/servlets/ReadMsg?msgId=329383&listName=dev http://openide.netbeans.org/servlets/ReadMsg?msgId=329414&listName=dev The answer to the following question on openide-dev was "no", plus a couple of suggestions for how it could be solved. Date: Mon, 03 Jun 2002 13:23:04 -0700 From: Tor Norbye <Torbjorn.Norbye@Sun.COM> Subject: [openide-dev] Explorer context menu items for invisible root I have an explorer pane (well, a treetable really). The root node is invisible (treeTable.setRootVisible(false)); The problem is, when I right click anywhere in the empty explorer (before any nodes have been created), the context menu is empty. I'd like to add some actions there, such as Add/New. Is there a way to do that? I have filed this as an Enhancement, but from a user's perspective it results in a major usability bug. When the view is empty, there is no way to "get started" other than through external actions.
This is a really often asked feature. A popup menu is not created over the empty area in TreeView because there is a check in TreeView.PopupAdapter if any row in a tree is selected, if not that a popup menu's is not showed. A question is, what popup menu could be used. Jesse advises, the root node's context menu, so the root node should be selected to make clear who is a author of menu, which node is related with a selected action. Other way, used a extendedMenu set by TV.createExtendedPopup, no matter any row is selected. Or, any third way? For me, it seems as UI issue; Jano, could you look on or comment it, please? After that, reassign back to me. Thanks
Note - the same menu (the root menu) should be used when there -are- nodes in the explorer sa well, but the user clicks outside / in an empty part of the view.
*** Issue 31457 has been marked as a duplicate of this issue. ***
first, i would call this a defect bcs of the usability problems tor mentioned. second, i think showing the root node's popup menu is an reasonable solution to both the open context menu in empty explorer and open context menu in white space of non-empty explorer. the only catch is that there are probably times where some of the root node's actions make no sense in an empty space and should be unavailable -i assume that the mechanism that checks which actions are available is separate from the mechanism that builds the popup menu.
Jirka, please implement it according Chris' previous summarizing comment.
Because of it's late phase of TEGAL development, will be solved in next release. But I can note that the asked functionality for PopupMenu in TreeTableView was implemented (issue 30932) in 3.5, the rest functionality will be implemented in 4.0.
when no node is selected, the popup menu is populated with actions from the root node Checking in src/org/openide/explorer/view/TreeView.java; /cvs/openide/src/org/openide/explorer/view/TreeView.java,v <-- TreeView.java new revision: 1.179; previous revision: 1.178 done
verified