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.
org.netbeans.modules.spi.project.ui.LogicalViewProvider CVS revision 1.6, org.netbeans.modules.project.ui.ProjectsRootNode CVS revision 1.22. The javadoc of LogicalViewProvider.findPath claims that the root argument is "a root node from createLogicalView". I understand this in such a way that the root == result of (some recent invocation of) createLogicalView. But, current ProjectsRootNode sends different node (subclass of FilterNode, ProjectsRootNode$BadgingNode) into the findPath method. Please either: -clarify that the root argument of the findPath method can be a wrapper node around the node returned from createLogicalView and either provide means of getting the original node or clarify that the implementor is responsible for getting the original node. -send the same node as was returned by the createLogicalView into the findPath method.
It think it is the former, i.e. a wrapper node can be passed, and that fP impls should use nodes properly, i.e. by checking cookies/lookup only, and never relying on impl class. But will leave it to Petr to confirm and clarify.
Just a note: in the case 1, gathering the original node is invalid, as the children of the wrapper root node may (not sure whether they are, not tried) also be FilterNodes, and in this case it would probably be awaited that the findPath method returns appropriate FilterNode, not the original node. Therefore lookups (or cookies) of the Nodes should be used. After thinking about it more, it seems to me that the case 1 (wrapper node is allowed) makes more sense than the other case. Therefore I suggest that the javadoc is modified to reflect this.
Good point - if the root is a filter node, its children must be as well. (A Node can only belong to one Children at a time.) So passing in the original root node would be useless - you would find the original child, but then you would still not know which filtered child that corresponded to.
Checking in projects/projectuiapi/src/org/netbeans/spi/project/ui/LogicalViewProvider.java; /cvs/projects/projectuiapi/src/org/netbeans/spi/project/ui/LogicalViewProvider.java,v <-- LogicalViewProvider.java new revision: 1.7; previous revision: 1.6 done
I think it is OK now (LogicalViewProvider revision 1.7).