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 7362 - Make DataFolder.createNodeChildren safer
Summary: Make DataFolder.createNodeChildren safer
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 22386
  Show dependency tree
 
Reported: 2000-08-11 17:14 UTC by Jesse Glick
Modified: 2008-12-22 15:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2000-08-11 17:14:34 UTC
At joint suggestion between Jesse + Jarda:

/** This method allows DataFolder to filter its nodes.
 *
 * @param filter filter for subdata objects
 * @return the node delegate (without parent) for this data object
 */
 final Node getClonedNodeDelegate (DataFilter filter) {
   // [PENDING] or use .class()==FolderNode.class?
   if (getNodeDelegate () instanceof FolderNode) {
     // creates normal node and filters its children
     return new ClonedFilter (filter);
   } else {
     return getNodeDelegate ().cloneNode ();
   }
 }

Should make it nicer to subclass DataFolder + FolderNode.

Also CC George.Fink@eng.sun.com.
Comment 1 Jan Zajicek 2001-01-23 09:31:59 UTC
Automated change of version from Other to Dev.
Comment 2 Jesse Glick 2001-02-18 22:04:13 UTC
Actually more complicated than that, but anyway fixed in the trunk. Now
getClonedNodeDelegate will pay attention to what it is cloning, and respect
subclasses' choices of children. It should no longer be necessary for anyone to
override createNodeChildren(DataFilter).
Comment 3 Quality Engineering 2003-07-01 15:49:55 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 4 Quality Engineering 2003-07-01 16:09:47 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.