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.
How to reproduce: 1) Create a new "Mobility|Mobility Application" app. 2) Right-click on the project node and select "New" popup menu item. 3) Note - the "New" sub-menu has to appear. 4) Close IDE 5) ERROR - List of pending locks is reported and the "Templates/MIDP/VisualDesign.vmd" and other templates are listed. The templates are MultiDataObjects (.java and .vmd files), they are locked and always unlocked using "MfLock.releaseLock". The issue could be that the "map" field within the lock does not contains any entry (MfLock.addLock is not called).
Potential locks are not reliably implemented because current implementation is missing information of locked files and uses hacks (createLocksOn) for achieve it. Adding new API FileObject.isLocked could be enough to be able to decide whether potential locked file is really locked. To make it even better we could add methods notifyLock, notifyUnlock into MultiFileSystem. Method isLocked was already required AFAIK anyway.
Created attachment 45597 [details] proposed API change, test, improved impl. of potential locks in LocalFileSystemEx
Missing @since on FO.iL(). Import of Exceptions in FO.java unnecessary. Don't forget to update <date> when you actually commit.
I believe this isn't controversial, so will be fixed today.
/cvs/openide/fs/src/org/openide/filesystems/MIMESupport.java,v <-- MIMESupport.java new revision: 1.21; previous revision: 1.20 /cvs/openide/fs/src/org/openide/filesystems/FileObject.java,v <-- FileObject.java new revision: 1.19; previous revision: 1.18 /cvs/openide/fs/src/org/openide/filesystems/AbstractFileObject.java,v <-- AbstractFileObject.java new revision: 1.11; previous revision: 1.10 /cvs/openide/fs/src/org/openide/filesystems/MultiFileObject.java,v <-- MultiFileObject.java new revision: 1.12; previous revision: 1.11 /cvs/core/startup/src/org/netbeans/core/startup/layers/LocalFileSystemEx.java,v <-- LocalFileSystemEx.java new revision: 1.7; previous revision: 1.6 /cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java,v <-- MasterFileObject.java new revision: 1.66; previous revision: 1.65 /cvs/openide/masterfs/src/org/netbeans/modules/masterfs/Delegate.java,v <-- Delegate.java new revision: 1.27; previous revision: 1.26 /cvs/openide/fs/apichanges.xml,v <-- apichanges.xml new revision: 1.15; previous revision: 1.14 /cvs/openide/fs/manifest.mf,v <-- manifest.mf new revision: 1.11; previous revision: 1.10 /cvs/openide/fs/test/unit/src/org/openide/filesystems/FileObjectTestHid.java,v <-- FileObjectTestHid.java new revision: 1.14; previous revision: 1.13