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 61824 - Should have DataNode constructor taking Lookup
Summary: Should have DataNode constructor taking Lookup
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API, API_REVIEW_FAST
Depends on: 62707
Blocks:
  Show dependency tree
 
Reported: 2005-08-05 08:26 UTC by Libor Kotouc
Modified: 2008-12-22 16:44 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Diff with related changes (5.56 KB, patch)
2005-08-05 09:56 UTC, Libor Kotouc
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Libor Kotouc 2005-08-05 08:26:29 UTC
There is a need for associating DataNode with a Lookup.
Comment 1 Libor Kotouc 2005-08-05 09:56:15 UTC
Created attachment 23518 [details]
Diff with related changes
Comment 2 Libor Kotouc 2005-08-19 15:41:40 UTC
Palette client support does not need the DataNode's constructor because item
nodes are created using own environment provider implementation.
Comment 3 Jesse Glick 2005-08-19 16:18:03 UTC
It's still a valid enhancement that we should do for other potential clients, I
think.
Comment 4 Jesse Glick 2005-08-19 16:20:15 UTC
Not currently under review however.

Probably would work best if DataObject implemented Lookup.Provider. Is there
such an issue filed already?
Comment 5 Jaroslav Tulach 2005-08-19 16:51:24 UTC
I'll apply this patch, this one is well done and simple. With respect to 
DataObject implementing Lookup.Provider, would be nice, but I am not in that 
hurry to do it. File another issue please. The best would then be to mimic 
NodeLookup. 
Comment 6 Jesse Glick 2005-08-19 17:37:20 UTC
apichanges: have to change <date> and <author> of course. And <description>
should be improved. <summary> also has a typo. And should have an 'id'.

Javadoc implies that DataNode.getCookie will behave correctly when you use this
constructor. But I do not think that is so, unless some magic in Node makes it
so. Perhaps DataNode.getCookie needs to be changed to first check in the Lookup
provided in the constructor (if one *was* provided in the constructor -
otherwise there would be an infinite loop). Should be easy to unit test this, I
guess. Also any change in the Lookup ought to fire a PROP_COOKIES, just in case.
Comment 7 Jesse Glick 2005-08-19 22:15:54 UTC
Tim I know you had an interest in DataObject.getLookup(). Did you ever file it
anywhere?
Comment 8 _ tboudreau 2005-08-19 23:06:19 UTC
Did now - issue 62707.
Comment 9 Jaroslav Tulach 2005-09-19 10:42:05 UTC
"#61824: constructor for DataNode that takes Lookup" 
 
 
Checking in loaders/manifest.mf; 
/cvs/openide/loaders/manifest.mf,v  <--  manifest.mf 
new revision: 1.23; previous revision: 1.22 
done 
Checking in loaders/api/apichanges.xml; 
/cvs/openide/loaders/api/apichanges.xml,v  <--  apichanges.xml 
new revision: 1.18; previous revision: 1.17 
done 
Checking in loaders/src/org/openide/loaders/DataNode.java; 
/cvs/openide/loaders/src/org/openide/loaders/DataNode.java,v  <--  
DataNode.java 
new revision: 1.22; previous revision: 1.21 
done 
Checking in loaders/test/unit/src/org/openide/loaders/DataNodeTest.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/DataNodeTest.java,v  
<--  DataNodeTest.java 
new revision: 1.3; previous revision: 1.2