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.
|Summary:||[TTV] Allow default actions on an explorer view when there are no visible nodes|
|Product:||platform||Reporter:||Torbjorn Norbye <tor>|
|Component:||Outline&TreeTable||Assignee:||Stanislav Aubrecht <saubrecht>|
|Issue Type:||DEFECT||Exception Reporter:|
|Bug Depends on:|
|Bug Blocks:||33281, 42994|
Description Torbjorn Norbye 2002-09-30 23:29:16 UTC
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.
Comment 1 Jiri Rechtacek 2002-10-01 18:22:45 UTC
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
Comment 2 Torbjorn Norbye 2003-02-26 17:22:15 UTC
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.
Comment 3 Torbjorn Norbye 2003-02-26 17:22:35 UTC
*** Issue 31457 has been marked as a duplicate of this issue. ***
Comment 4 Chris Ledantec 2003-02-26 17:43:43 UTC
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.
Comment 5 jrojcek 2003-03-04 13:37:37 UTC
Jirka, please implement it according Chris' previous summarizing comment.
Comment 6 Jiri Rechtacek 2003-03-04 13:44:49 UTC
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.
Comment 7 Stanislav Aubrecht 2005-01-17 16:06:45 UTC
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
Comment 8 Marian Mirilovic 2005-11-01 09:12:24 UTC