[tasklist] Re: Line.getDataObject()
Jesse Glick <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Organization | Sun Microsystems / NetBeans |
| Message-ID | <[email protected]> |
Jaroslav Tulach wrote: > 2. PropertiesEditorSupports have to be modified to add the DataObject > into their Lookup. I do not know if they want to do that. No! They should add the PresentableFileEntry and/or the matching FileObject into their Lookup. They should *not* add the DataObject, because there are several editable files in the DataObject, and so it would be misleading to produce a DataObject whose primary file might not be what the Line is actually referring to. This is a good reason why Line.getDataObject *should* be deprecated. IMHO DataEditorSupport.findDataObject(Line) should be replaced or supplemented with DataEditorSupport.findFileObject(Line) which would ask the lookup for a FileObject. That will work better in DS II, anyway. Just need to ensure that the FileObject is properly changed in the Lookup if the DataObject is moved to a new folder. -J. -- Jesse Glick <mailto:[email protected]> x22801 NetBeans, Open APIs <http://www.netbeans.org/>