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.
This is a proposed patch (patchfile attached) to make the behavior of F9 (Compile) more consistent. Currently when applied to a single file, it actually runs the equivalent of Build. The patch makes it compile only if the file is not up-to-date. Also the patch displays more information in the Output Window about the results of compilation; basically the finish message is displayed both in the status bar and in the Output Window, to ensure that users are not confused about whether their file was really compiled or not. See the discussion on nbui started by: http://www.netbeans.org/www-nbui/msg00917.html The patch will be attached. Upon request a full build or binary patch could be made so more people can try it out. It consists of changes to: - org.openide.loaders.CompilerSupport: removing special case - org.netbeans.core.compiler.*: providing special message when no compilation occurred because everything was up to date; always printing final message in Output Window - Java module: adding Build to .java context menu, since it now does something different - Ant module: removing some workarounds needed to counteract the special case; adding Build to context menu - NetBeans Help: updating two docs pages to reflect behavior Some issues not covered by this patch: - "Build" name left as is. nbui folks can determine if this is still a good name or if something like "Recompile" or "Force Rebuild" is more recognizable. - #2 of the proposal on nbui, to make the display of the result messages optional, is not implemented. There is no existing place in Options to set global compiler behavior, anyway. - "up-to-date" message is not consistently displayed in the Output Window, though it is always shown in the status bar. I suspect this is an org.netbeans.core.output.* timing bug since the only thing making this message different is that it is displayed very soon after compilation starts. - JAR Packager: Compile on a *.jar seems to always Build included files, not Compile them, which is inconsistent. - Java compilation: external compilation does not seem to refresh folders after compilation anymore, so the IDE may think it needs to recompile a file even though you just compiled it. If you manually refresh the folder, it gets it right. Probably a bug in Java external compiler types. - JSP compilation: never seems to be up-to-date, not clear what is happening.
Created attachment 427 [details] Suggested source patch to fix this bug
I made my part of the job - first two points.
Thanks, I will try to work out the rest of the stuff.
Leaving documentation part to Patrick.
Here is the JAR Packager bug as promised.
Cannot reproduce the problem with Java external compilation, assuming fine for now.
Ant/Java modules patched as well. Also JSP bug as mentioned. Does not seem to be any timing problem with Output Window with Ales's implementation.
closed