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.

Bug 129373 - DV undo/redo FileAlreadyLockedException
Summary: DV undo/redo FileAlreadyLockedException
Status: RESOLVED DUPLICATE of bug 125402
Alias: None
Product: xml
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 10:21 UTC by tonybeckham
Modified: 2008-03-06 14:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2008-03-06 10:21:37 UTC
If you add new element in Design View then rename it, add another element then undo the rename of the first one added
exception is thrown.

Steps:
1. In DV add a new element accept default name
2. In the properties window change the name to xxx
3. Now click somewhere in DV pane to take focus away from the element
4. From the Refactor menu choose Undo Silent refactor (name changed back to default and regular undo toolbar item is
enabled)
5. Select the toolbar undo icon (name changed back to xxx)
6. Add another element accepting default name (this should be the same as the first ones default name)
7. Select Refactor|Redo[Silent Refactor] exception is thrown

System Info:
Product Version: NetBeans IDE Dev (Build 200803051205)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb)
Comment 1 tonybeckham 2008-03-06 10:22:10 UTC
org.openide.filesystems.FileAlreadyLockedException: /Users/Tony/NetBeansProjects/BpelModule1/src/newXmlSchema1.xsd
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.registerLock(LockForFile.java:108)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:97)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:277)
	at org.openide.filesystems.FileObject.getOutputStream(FileObject.java:521)
	at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.copy(BackupFacility.java:272)
	at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.restore(BackupFacility.java:231)
	at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultHandle.restore(BackupFacility.java:168)
	at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.commit(XMLRefactoringTransaction.java:162)
Caused: java.lang.RuntimeException
	at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.commit(XMLRefactoringTransaction.java:165)
	at org.netbeans.modules.refactoring.api.RefactoringSession.doRefactoring(RefactoringSession.java:113)
	at org.netbeans.modules.refactoring.spi.impl.UndoManager$SessionUndoItem.redo(UndoManager.java:600)
	at org.netbeans.modules.refactoring.spi.impl.UndoManager.redo(UndoManager.java:257)
	at org.netbeans.modules.refactoring.spi.impl.RedoAction.performAction(RedoAction.java:96)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)
	at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:111)
	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:104)
	at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:52)
	at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:102)
	at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:71)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 2 Sonali Kochar 2008-03-06 14:22:41 UTC

*** This issue has been marked as a duplicate of 125402 ***