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.
1. Create a new Java Project. 2. Add a "hello world" println statement to main. 3. Project context menu>> Properties>> Compiling>> un-check "Compile on Save". 4. Notice the "Needs to be compiled" badge shows. Build project and badge goes away. OK 5. Rename project with "Also rename project folder". 6. Notice the "needs to be compiled" badge shows. Build project, but the badge does not go away. Expected: The badge goes away. Workaround: Restart NetBeans. Product Version: NetBeans IDE 7.3.1 (Build 201304162201) Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Also: Product Version: NetBeans IDE Dev (Build 201305152300) Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Please repeat your steps, but this time with enabled logging -J-Dorg.netbeans.modules.masterfs.watcher.level=FINE and attach your log file. Thanks.
Created attachment 136873 [details] logfile Logfile w/ -J-Dorg.netbeans.modules.masterfs.watcher.level=FINE
Still valid in 7.4 Dev. Although now the "needs to be compiled" badge will never go away on the new file that is recreated, even after restarting NetBeans. I even deleted the cache and it still shows the badge. Even on the final realease of 7.3.1 running the same JDK as the original report, the badge will never go away. Product Version: NetBeans IDE Dev (Build 201308300001) Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Constructor of o.n.spi.project.support.ant.GlobFileBuiltQuery.StatusImpl adds a file change listener for a target class file, but it is not updated if the project is renamed, so the project is still listening to events on the old (not existing) target files. Reassigning to Ant. Milos, please check it. Thank you.
(In reply to Jaroslav Havlin from comment #4) > Constructor of o.n.spi.project.support.ant.GlobFileBuiltQuery.StatusImpl adds > a file change listener for a target class file, but it is not updated > if the project is renamed, so the project is still listening to events > on the old (not existing) target files. the StatusImpl class *is* listening on the sourceFile rename and there is code present that reassigns the FileUtil listener on target file from old value to new value however while debugging project rename, the listener's fileRenamed is not called (nor is any other file listener method)
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
Still valid in: Product Version: NetBeans IDE Dev (Build 201607140002) Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb) Workaround Restarting netbeans makes badge go away now.
fixed in jet-main #eda14d7f4a82
Integrated into 'main-silver', will be available in build *201607210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/eda14d7f4a82 User: Tomas Stupka <tstupka@netbeans.org> Log: Issue #229896 - "Needs to be compiled" badge does not go away if project & project folder renamed