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.
It would be nice if the next/previous error actions worked for errors found during ant compilation.
Could you please be more specific? What you are proposing is already working: I compiled an Ant script, got some errors, and was able to press in Editor F12 or SHIFT+F12 to cycle through the errors. (I'm using latest NB3.4)
Closing as WORKSFORME - this functionality is already implemented. Please reopen if I misunderstood your proposal, or file bug if existing functionality does not work. Thanx.
I can't get this to work at all. I execute an ant target in any number of ways (compiling a project that contains an ant script, selecting a build file and executing it, or selecting an ant target and executing it), and the output goes to the "Ant Execution" output window. If there is an error in the Java files that are being compiled, these actions do nothing. (They aren't disabled in the toolbar/menu - they just do nothing). They also remain ineffective if there is an error in the ant script (such as a missing target specified in a dependency). I have two difficulties with this: 1) The fact that these actions won't do anything for me. 2) If I am compiling an ant script I'd expect that the output should really go to the "Compiler" output window. I'd also expect that it should contain the output for all ant targets executed ("clean" and "all", when doing a "build"), but because it is using the "Ant Execution" output window and "reusing" it for each target, you only see the output from the last target. I have tried this with various builds of NetBeans. Currently I have 3.4 beta 1 and it doesn't work for me. (I should note that if I just select a java file and compile out without using ant then the next/previous error works for me).
As you write that all ant output goes to Ant Execution tab it means that you have property "Reuse output tab" set true and then all output from ant will go one tab and replace the previous. If you want to have own tab for each script or target set the property to false (Tools|Options -> Building|Ant Settings -> Reuse output tab). I will file another issue for links from output window, it seems to be more complex bug.
I suggest to close this issue as duplicate of issue 24698. Do you agree Brett?
Yes, close it as a duplicate. *** This issue has been marked as a duplicate of 24698 ***
I'm reopening this issue because it appears 24698 has been resolved, and I realised that I was experiencing a different problem. In 24698 the issue was that files aren't linked in the output window. When compiling with Ant I find that my files are linked but the next/previous error action is not always enabled. I've found that if I compile by selecting the build script and "Run Target" the next error action (F12) works. However, I normally compile by: (1) adding my build.xml to the project, (2) setting it for "Ant Script Compilation" and (3) then using "Compile Project" or "Build Project". If you compile in this way, the "Next Error" is not enabled for compile errors. I also tried setting my Java files to use "Indirect Ant Compilation" by default, and compile (F9) them. Next error also does not work when I do this. However, the errors are hyperlinked and the links work. I've just noticed that the "next error" is enabled during the ant compilation after the first build error is produced, but becomes disabled when the build completes. (When using Ant Script Compilation or Indirect Ant Compilation). I've tried this on 3.4RC1.
It seems that it doesn't depend on the way how the ant script is executed, it happens for me even if I execute that script. David of Jesse, please evalute if it can be fixed or marked as waiver.
This problem happens everytime when the compiler of Ant script is set to "Ant Script Compilation". The problem is that Ant opens own Output tab with its own name and that after the compilation is finished, the Core opens the second output tab with name "Compiler" where the status of compilation (successful or not is shown). The second tab is activated and because all the errors were logged in the first tab, the F12 does not work. I put Ales on the CC. I'm not sure who is doing wrong thing here. Is it required that all compilation must be put into "Compiler" output tab?
Created attachment 6983 [details] patch
Jesse, do you think the patch I attached could work and does not break anything?
Looks reasonable except for one thing: the bug will be rebroken if you ever get a mismatch in the tab display names. (E.g. Japanese translator for core makes a different decision than Japanese translator for ant module.) So you had better put a clear warning in ant's Bundle.properties right before the key that it must match the corresponding name in core.
Jesse, yes I know about that problem. Mentioning it in bundle is good idea. What QA thinks about this issue? Is it showstopper which must be integrated into NB3.4? The fix is trivial and should not cause any regressions. IMHO, it is candidate for 3.4.1 and should be mentioned in release notes that F12 does not work in this case.
Sure doesn't sound like a showstopper to me. But may have affects on keyboard users so marking A11Y. Agreed this would be good for a hypothetical 3.4.1, and should be mentioned in release notes.
I think that Jesse's last comment is OK from QA point of view.
I will integrate the fix next week.
I'm asking for 3.4_WAIVER. Only keyboard users are affected by this problem, the workaround is to use mouse. The fix of the issue is trivial, but the problem is not serious enough for 3.4.
I agree with the waiver
Proposed release note: When using Direct Ant Compilation, the Next Error and Previous Error commands do not work, because an output tab that does not contain the errors is active.
The name of the compiler is "Ant Script Compilation" and not "Direct Ant Compilation". Even if you activate the output tab with the compiler errors the Next/Prev error will still not work. But these two things might be details.
But good details. They definitely answer questions that my text implies, so thanks. Here's my revision: When using the Ant Script Compilation compiler type, the Next Error and Previous Error commands do not work, because an output tab that does not contain the errors is active. Switching to the correct tab does not fix the problem.
Fixed in trunk: Checking in src/org/apache/tools/ant/module/run/AntCompilerGroup.java new revision: 1.6; previous revision: 1.5 Checking in src/org/apache/tools/ant/module/run/Bundle.properties; new revision: 1.14; previous revision: 1.13 Checking in src/org/apache/tools/ant/module/run/TargetExecutor.java; new revision: 1.24; previous revision: 1.23
*** Issue 27060 has been marked as a duplicate of this issue. ***
> Fixed in trunk: This will only make a difference if after compilation the focus is set to Ant Execution tab so the user can immediately press F12 to go to the error without using the mouse at all. Currently (NB 3.4) the focus is set to the Compiler tab, which, in case of Ant compilation, probably is not necessary at all.
Verified.
Links to diffs: <http://ant.netbeans.org/source/browse/ant/src/org/apache/tools/ant/module/run/AntCompilerGroup.java.diff?r1=1.5&r2=1.6> <http://ant.netbeans.org/source/browse/ant/src/org/apache/tools/ant/module/run/Bundle.properties.diff?r1=1.13&r2=1.14> <http://ant.netbeans.org/source/browse/ant/src/org/apache/tools/ant/module/run/TargetExecutor.java.diff?r1=1.23&r2=1.24>
Jesse Glick wrote: > Agreed this would be good for a hypothetical 3.4.1 David Konecny wrote: > The fix of the issue is trivial Milan Kubec wrote: > Verified. I suppose this issue as already reviewed and ask to commit the fix into release341 branch. Sincerely yours, Maxym Mykhalchuk, Netbeans 3.4.1 "Merak" Release Coordinator
Yes, consider the 13.11.2002 diffs reviewed.
Integrated into NB341.
*** Issue 29670 has been marked as a duplicate of this issue. ***
Removing RELNOTE keyword since this is not a problem in release35
Resolved for 3.3.x or earlier, no new info since then -> closing.