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.
Created attachment 127865 [details] Proposed changes - initial version I would like to have access to the FileObject referened by the DataShadow. The FileObject may be invalid or otherwise unsuitable for DataObject creation, as e.g. FileObjects created by enhancement #222202. This added API would allow to detect links to a certain file (e.g. an Action registration) and even in the case of deleted or changed files on a MultiFileSystem. After discussion with jtulach, I propose to create an public static FileObject findOriginal(FileObject shadow) and refactor the current protected deserialize() method so that the processing is in findOriginal, and deserialize() just wraps it. Please see the attached diff for proposed changes.
Y01 Is not there an incompatible change in the deserialize behavior? Previously one could (probably) deserialize file with any extension. Now the extension is restricted to .shadow, I think. Btw. there is FileObject.hasExt(...) method.
Y01: right - apologies; seems as leftover from prototype coding, not an intention. Will remove.
Created attachment 128124 [details] updated with Y01
OK. Except the typo: org.openide.loaderss
No further input, I'll correct the typo & commit.
Changeset: 5690f8401eea Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-11-23 17:41 Message: Implemented findOriginal() to get the referenced FIleObject.
Integrated into 'main-golden', will be available in build *201211240959* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5690f8401eea User: Svata Dedic <sdedic@netbeans.org> Log: Issue #222204 - Allow to get the referenced FileObjects: fixed Implemented findOriginal() to get the referenced FIleObject.