There is a need for associating DataNode with a Lookup.
Created attachment 23518 [details]
Diff with related changes
Palette client support does not need the DataNode's constructor because item
nodes are created using own environment provider implementation.
It's still a valid enhancement that we should do for other potential clients, I
Not currently under review however.
Probably would work best if DataObject implemented Lookup.Provider. Is there
such an issue filed already?
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
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.
Tim I know you had an interest in DataObject.getLookup(). Did you ever file it
Did now - issue 62707.
"#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
Checking in loaders/api/apichanges.xml;
/cvs/openide/loaders/api/apichanges.xml,v <-- apichanges.xml
new revision: 1.18; previous revision: 1.17
Checking in loaders/src/org/openide/loaders/DataNode.java;
new revision: 1.22; previous revision: 1.21
Checking in loaders/test/unit/src/org/openide/loaders/DataNodeTest.java;
new revision: 1.3; previous revision: 1.2