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 216408

Summary: Compile on save and F6
Product: java Reporter: fommil <fommil>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description fommil 2012-08-05 11:31:08 UTC
I'm experiencing really weird behaviour with 7.2 and a Swing app (using Maven project, and worth noting, Lombok).

I have a JFrame application that I created using the GUI Editor, which is invoked on F6, and if I make any edit changes to the file and press F6 they are ignored.

Compile on Save (application and tests) is enabled.

Workaround: "Clean and Build" any time I edit the file.

Bizarrely, if I make changes in any other file with a main method and press shift-F6, the changes ARE seen.

Also, if I make changes in any other file and press F6, the changes are also seen.
Comment 1 Dusan Balek 2012-08-06 08:38:49 UTC
Unfortunately, I cannot reproduce the problem. Could you please create a simple reproducible test case (simple project + exact steps to reproduce) and attach it to the issue? Thanks.
Comment 2 fommil 2012-08-06 08:46:49 UTC
Bizarre, it seems to have fixed itself.

But I swear this *was* happening yesterday.

Is there any way for me to *absolutely guarantee* that "build" is called prior to a run? That way I can at least blame Maven if the classes aren't recompiled.
Comment 3 fommil 2012-08-09 12:25:58 UTC
not fixed - back again - and not just in JFrame. It is erratic and I can't create a standalone test.

As a workaround, is there any way to ensure that F6 calls "compile" before "run". Ideally, it would delete any "jar" that has been built. When I hit F6, I can drop to the terminal and "mvn compile" will update the binaries because Netbeans isn't compiling the files.
Comment 4 fommil 2012-08-09 13:58:19 UTC
Workaround: completely disable "compile on save" and the F6 etc commands will then invoke the correct Maven compilations.
Comment 5 Martin Balin 2015-09-17 11:15:41 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.