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 229896 - "Needs to be compiled" badge does not go away if project & project folder renamed
Summary: "Needs to be compiled" badge does not go away if project & project folder ren...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-16 23:54 UTC by MackSix
Modified: 2016-07-21 01:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
logfile (60.65 KB, text/plain)
2013-07-09 12:44 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-05-16 23:54:26 UTC
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)
Comment 1 Jaroslav Tulach 2013-07-09 09:41:06 UTC
Please repeat your steps, but this time with enabled logging

-J-Dorg.netbeans.modules.masterfs.watcher.level=FINE

and attach your log file. Thanks.
Comment 2 MackSix 2013-07-09 12:44:03 UTC
Created attachment 136873 [details]
logfile

Logfile w/ -J-Dorg.netbeans.modules.masterfs.watcher.level=FINE
Comment 3 MackSix 2013-08-30 18:22:55 UTC
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)
Comment 4 Jaroslav Havlin 2013-09-24 14:25:38 UTC
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.
Comment 5 Milos Kleint 2013-10-07 16:07:28 UTC
(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)
Comment 6 Martin Balin 2016-07-07 08:38:05 UTC
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
Comment 7 MackSix 2016-07-19 07:12:31 UTC
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.
Comment 8 Tomas Stupka 2016-07-20 16:04:11 UTC
fixed in jet-main #eda14d7f4a82
Comment 9 Quality Engineering 2016-07-21 01:51:32 UTC
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