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.
From a discussion on nbdev: > >>>2) How do I set it up to accept a subset of a data object like a FieldElement? If I add > >>>FieldElement to the cookies list, Ok is enabled on the Fields category, but not on individual > >>>fields. > >>> > >>This is (hopefully) not fault of the editor. Probably the cookie is present on the node and not > >>on the individual fields nodes. Try to find another cookie. If it is not the case please file a bug > >>for the editor. Hint: you can use apisupport module to find sets of cookies for individual nodes. > >> > > I checked the nodes using the apisupport module and the individual fields *do* have a > > FieldElement cookie while the category does not.
After (rather long) investigation I have found the reason why the editor does not behave like you expected. The DataObjectEditor serves as editor for DataObjects. So what it does after you click on a node in the custom editor is this: 1. it asks the selected node for its DataObject cookie 2. it cycles through all the supplied Cookies and asks the DataObject from 1. whether it is able to return them. I hope that the described algorithm is correct - if you disagree please bring arguments why it should not work like this. Now why the FieldElement cookie does not work: The field node returns JavaDataObject as DataObject cookie. JavaDataObject knows nothing about FieldElement cookie. You might ask why don't I check cookies on the selected node rather than on the resulting DataObject. The reason is that I don't think it would be correct to return a DataObject that does not supply the cookie that was asked for in the hint. So closing the issue as invalid.
Thanks for the investigation, David. I knew that the JavaDataObject doesn't know about the FieldElement, but I mentioned at the beginning that I had a requirement to find a node with a specific cookie underneath a specified DataObject. Are you saying this editor just doesn't support that? Can we add that support or introduce another (CookieEditor) with hints?
I have talked to Svata and Yarda about this and they both (independently!) suggested to create a new editor. So creating a new editor if probably the right way. Be it for Node.Cookie or whatever. It is probably up to you. We can put it to the trunk and if you build on top of release331 you can package the class with your module. Is that Ok? Please create new enhancement issue with this. And when we are at it you can assign it to yourself if you have time (or leave it on me).
We've all agreed that this should be handled by a separate editor which hopefully can inherit most of the smarts from the DataObject editor.
Target milestone was changed from '3.4' to TBD.
reassigne to Tim, new owner of property editors.
Rochelle, et. al., it sounds like this editor was indeed written - what happened with this? Was it already committed to the trunk, and the issue should be closed, or is there still something to be done?
I have such an editor, but it is not in the core. My goal during the 3.3 cycle was to move to using the standard DataObject editor. This issue and others were filed to capture the reasons I was not able to move to the standard ones.
Decreasing priority to P4 - if your impl works (and nobody has chimed in with similar requirements), this is low priority. Apologies, and feel free to return it to P3 if you feel strongly that it should be there.
Passing property editor issues to new owner, Jirka
Obsolete I think. Closed as WONTFIX