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.
Product Version: NetBeans IDE Dev (Build 20081006054500) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb) Description: ============ 1. have form class 2. move this class to another package 3. insert some component there and try to save it => not possible => data loss StackTrace: =========== SEVERE [global] org.openide.text.CloneableEditorSupport$4: File C:\Documents and Settings\Admin\My Documents\NetBeansProjects\JavaApplication38\src\javaapplication38\NewJFrame.java was modified externally. Overwrite it? at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:899) at org.openide.text.DataEditorSupport.superSaveDoc(DataEditorSupport.java:417) at org.openide.text.DataEditorSupport$SaveImpl.run(DataEditorSupport.java:1006) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:502) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:216)
Created attachment 71267 [details] 149330
Passing to Jarda.
duplicate of issue 149152 that was fixed in issue 149069 *** This issue has been marked as a duplicate of 149069 ***
Product Version: NetBeans IDE Dev (Build 200810080201) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) I can still reproduce this, even with issue 149069 fixed.
For now I can reproduce this bug even though issue 149069 has been already fixed. I am not sure about described steps in 149069 if they are working therefore I will reopen this issue. But if description in 149069 always persists please reopen it as soon as possible and mark this issue as duplicate once again. Tested on Product Version: NetBeans IDE Dev (Build 20081009145249) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Cannot reproduce on my linux and revision 2503c826312d
Works on my windowsxp as well. If you insist on existence of the problem, try to generate some logs with -J-Dorg.openide.text.level=100
I reproduced this defect on 200810090201. See attached messages.log. P1? Restart IDE fixed it.
Created attachment 71532 [details] messages.log
easily reproducible on my build 2503c826312d Product Version: NetBeans IDE Dev (Build 081009) Java: 1.5.0_14; Java HotSpot(TM) Client VM 1.5.0_14-b03 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) -create new java project -create new jframe class in the javaapplicationrefactor package -put some components to the jframe, close it -right click the class, Refactor > Move -move to javaapplicationrefactor.newpackage -open the jframe -put some components on it ->CTRL+S, Save All does nothing I'll try to pull -u and rebuild my build to latest sources but definitely reproducible after the fix of 149069
I need logfile with records from org.openide.text logger.
I'm sorry Jardo. I cannot help myself but it cannot be a reason to close it as worksforme, it have happened recently to three peoples. Consider the priority instead, but it's still a real problem in Nb6.5.
Workforme, means "for me". I need the log or reproducible scenario.
Created attachment 71540 [details] log with the switch that Jarda required
log attached -> reopening I'm decreasing priority as it doesn't seem to be datalost. The file is saved only the tab in editor still shows the *. And the exception is logged. And the "file modified externally dialog" appears when you want to close&save the document. Definitely something that needs to be fixed for 6.5 -> P2
Created attachment 71543 [details] log message with jarda's switch
Product Version: NetBeans IDE Dev (Build 200810100201) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) Additional observations, maybe some of them help: - I can reproduce this on Ubuntu too - When this problem occurs and the IDE is closed, the form file can be saved by the dialog that appears during closing. However, only the layout of the form is saved (in the Design view you can see the all changes you made). The changes in the source code are lost. - I could not reproduce this behaviour on project, created in older versions (I opened project created by NB 6.1 and it was working fine). It seems it has to be fresh new project - After the moving of the form file to a new package (and after confirming of the Refactoring dialog), the exception warning dialog appears, but it is closed immediatelly (can be observed better on a low performance machines)
I've managed to simulate the problem once following Lukáš's steps.
I have just fixed something: afe07db1345a
*** Issue 149152 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *200810140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/63674cda1579 User: Jaroslav Tulach <jtulach@netbeans.org> Log: Use setter to modify lastModified time. Plus an additional test to similate #149330 - unsuccessfully
*** Issue 149992 has been marked as a duplicate of this issue. ***
*** Issue 150217 has been marked as a duplicate of this issue. ***
I tried to verify this bug on RC1 where should be already fixed (according to record in releas65 clone http://hg.netbeans.org/release65/rev/63674cda1579) but the issue always happens => reopening Use steps described by lhasik 1. create new java project 2. create new jframe class in the javaapplicationrefactor package 3. put jButton into the jframe 4. move to javaapplicationrefactor.newpackage 5. add actionPerformed to jButton ->CTRL+S, Save All does nothing tested on Product Version: NetBeans IDE 6.5 RC1 (Build 200810151402) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb) And what about the priority. I have to insist on P1 because there data loss really happens even though it's not visible for the first sight. Form in design looks like all changes were saved but source code contains old data and newly generated one has been lost. e.g. do all 5 steps 6. CTR+S 7. close the form and push save button which appears afterwards => warning is thrown 8. restart IDE 9. confirm save (no warning now and IDE is closed and finally opened) check source code of jFrame => no code for actionPerformed is there
Created attachment 71949 [details] RC1 messageLog
I can reproduce with "plain" java. -have javaapplication/Main.java -move it to javaapplicationrefactor.newpackage -CTRL+S ->file modified externally message appears
Created attachment 71956 [details] log from rc1 when refactor+file modified. With plain java.
Unit test written.
Created attachment 71986 [details] Could this be the fix we are searching for?
Fixed: http://hg.netbeans.org/main/rev/09c8d6bb50aa I needed to introduce new friend API. Jesse, Jirka Skřivánek, Marek Sláma, Tomáš Holý can you be reviewers and confirm that this is acceptable API change?
Harmless for branch. For the trunk I would suggest a properly exposed constant in Env.
patch is working, I will verify it firstly on trunk build late tonight and finally on new build of RC1 tomorrow morning.
Works on trunk build, Win2K, refactoring move java calss to another package. Before it failed now it works. Patch seems ok.
Patch works for me. Both test and 'save after refactoring' case are fixed by the patch.
verified on trunk build Product Version: NetBeans IDE Dev (Build 20081016162902) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
http://hg.netbeans.org/release65/rev/7e52f56b4776
Integrated into 'main-golden', will be available in build *200810170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/09c8d6bb50aa User: Jaroslav Tulach <jtulach@netbeans.org> Log: #149330: Extra API between CloneableEditorSupport and DataEditorSupport to notify the first about change of primary file
verified on RC1 Product Version: NetBeans IDE 6.5 RC1 (Build 200810170201) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)