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 120642 - REF: after some steps, form files seems to be locked which cases execption in refactoring
Summary: REF: after some steps, form files seems to be locked which cases execption in...
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
Depends on:
Reported: 2007-10-31 15:41 UTC by Jana Maleckova
Modified: 2009-05-25 20:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

120642 (2.16 KB, text/plain)
2007-10-31 15:56 UTC, Jana Maleckova

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2007-10-31 15:41:44 UTC
Product Version: NetBeans IDE Dev (Build 20071031011220)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

have a clear frame
1. insert jButton
2. switch to source and then back to design
3. change variable name of jButton using contextual menu invoked on button node in inspector
4. insert another jButton
5. do Refactoring - Undo
an exception is thrown

I am not really sure if this is bug in refactoring or there is collision caused by differences between temporary model
created by form module and saved file on disk. Therefore I assigned this bug firstly on form for evaluation

SEVERE [org.openide.util.RequestProcessor]
org.openide.filesystems.FileAlreadyLockedException: C:/Documents and Settings/Admin/My
        at org.netbeans.modules.masterfs.Delegate.lock(
        at org.netbeans.modules.masterfs.MasterFileObject.lock(
        at org.openide.filesystems.FileObject.getOutputStream(
        at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.copy(
        at org.netbeans.modules.refactoring.spi.BackupFacility$DefaultImpl.restore(
Comment 1 Jana Maleckova 2007-10-31 15:56:25 UTC
Created attachment 52135 [details]
Comment 2 Petr Dvorak 2008-04-29 11:12:51 UTC
Reproducible in:

Product Version: NetBeans IDE Dev (Build 200804290004)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb)
Comment 3 Tomas Pavek 2008-06-13 13:22:27 UTC
Ideally the refactoring undo action should be disabled when a change is made in the form. The problem is that a change
in the form does not change the document where the refactoring's UndoManager is listening. Unfortunately the UndoManager
is not accessible to be called directly. This could be workarounded by changing the document with every change in form
(not regenerating code but doing some dummy change like adding a space and removing). Not sure if such a hack is worth

Issue 48427 is somewhat related.