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 100545 - Select DataNode children in Explorer
Summary: Select DataNode children in Explorer
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Favorites (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-10 22:51 UTC by gwaldon
Modified: 2010-10-07 10:59 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gwaldon 2007-04-10 22:51:48 UTC
Currently "Select in Favorites" action only selects DataNodes in the Explorer.
This enhancement proposes to add a means to select DataNode children.

DataNode children usually represents varied elements of a data model. A typical
use case would be, e.g. to select a method node by right-clicking the editor in
the corresponding method and further invoking the "Select in Favorites" action
in the popup.

A simple implementation is to iterate all the children of a DataNode and look
for the property "marked". Here is a partial coding example that could be
implemented in org.netbeans.modules.favorites.Tab.selectNode method:

//find the DataNode
Node node = findClosestNode(...);
//iterate over children and check for "marked" property
//child represents one of node children, at any depth
if(child.getValue("marked").equals(Boolean.TRUE))
    node = child; 
//Break search 
//Select as usual
getExplorerManager ().setSelectedNodes (new Node[] { node });

The API user takes care of managing the "marked" property in its model and
properly delegates the node property "marked" to the representing elements.
Comment 1 Petr Nejedly 2007-04-11 08:04:44 UTC
Reassigning.
Anyway, we're turning off from displaying subnodes under DataObject nodes in
views like projects, files, favorites....
Comment 2 gwaldon 2007-04-11 16:32:49 UTC
Maybe this use-case is not the best example - there are effectively little needs
to show java class subnodes in files or favorites view, probably because these
views are too complex. 

I work on files where first-degree subnodes support all sorts of drag & drop
operations and having a quick access to them is very inmportant. This is a
nice-to-have enhancement for platform developers that is easy to implement and
to maintain.
 
Comment 3 mslama 2007-04-11 20:08:35 UTC
Yes. In 6.0 dev ie. current main trunk we do not display DataNode children in
Favorites tab. So it looks like this is not valid anymore.
Comment 4 gwaldon 2007-04-12 17:08:28 UTC
A few comments here. 

1.When children are too complex, i.e. with too many levels, they are not used.
IF children from java classes where, since the beginning, all at the first
level, like in the navigator window, they would have encountered wide use in the
community.

2. Does this means that we will not be able to check inside a zip file? This
sounds like a regression to me.

3. Restriction wieving children should be left to the developers. In other
words, that capability should be available in the platform (favorite), maybe
with a property associated with it.
Comment 5 rmichalsky 2009-06-16 12:56:27 UTC
Reassigning