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 24474 - next/previous error from ant compilation
Summary: next/previous error from ant compilation
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker with 1 vote (vote)
Assignee: David Konecny
URL:
Keywords: A11Y
: 27060 29670 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-06 04:36 UTC by bwl
Modified: 2003-06-30 14:46 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (4.27 KB, patch)
2002-08-01 21:27 UTC, David Konecny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bwl 2002-06-06 04:36:56 UTC
It would be nice if the next/previous error actions worked 
for errors found during ant compilation.
Comment 1 David Konecny 2002-06-06 08:48:06 UTC
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)
Comment 2 David Konecny 2002-06-07 10:25:00 UTC
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.
Comment 3 bwl 2002-06-12 02:43:37 UTC
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).
Comment 4 Milan Kubec 2002-06-12 14:56:14 UTC
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.
Comment 5 David Konecny 2002-06-12 15:23:03 UTC
I suggest to close this issue as duplicate of issue 24698. Do you 
agree Brett?
Comment 6 bwl 2002-06-12 23:43:44 UTC
Yes, close it as a duplicate.

*** This issue has been marked as a duplicate of 24698 ***
Comment 7 bwl 2002-08-01 02:56:19 UTC
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.
Comment 8 Milan Kubec 2002-08-01 09:41:38 UTC
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.
Comment 9 David Konecny 2002-08-01 21:23:46 UTC
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?
Comment 10 David Konecny 2002-08-01 21:27:26 UTC
Created attachment 6983 [details]
patch
Comment 11 David Konecny 2002-08-01 21:31:33 UTC
Jesse, do you think the patch I attached could work and does not break
anything?
Comment 12 Jesse Glick 2002-08-02 17:53:49 UTC
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.
Comment 13 David Konecny 2002-08-02 18:57:56 UTC
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.
Comment 14 Jesse Glick 2002-08-02 21:48:30 UTC
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.
Comment 15 Milan Kubec 2002-08-05 11:10:43 UTC
I think that Jesse's last comment is OK from QA point of view.
Comment 16 David Konecny 2002-08-05 16:47:16 UTC
I will integrate the fix next week.
Comment 17 David Konecny 2002-08-05 18:18:30 UTC
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.
Comment 18 iformanek 2002-08-05 18:34:35 UTC
I agree with the waiver
Comment 19 Patrick Keegan 2002-08-08 16:47:14 UTC
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. 
Comment 20 David Konecny 2002-08-08 17:55:16 UTC
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.
Comment 21 Patrick Keegan 2002-08-08 18:00:19 UTC
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.
Comment 22 David Konecny 2002-08-19 14:27:27 UTC
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
Comment 23 David Konecny 2002-09-06 08:43:30 UTC
*** Issue 27060 has been marked as a duplicate of this issue. ***
Comment 24 oneway 2002-09-26 16:56:39 UTC
> 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.
Comment 25 Milan Kubec 2002-10-14 09:12:57 UTC
Verified.
Comment 27 _ mihmax 2002-11-24 15:41:27 UTC
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
Comment 28 Jesse Glick 2002-11-29 16:22:08 UTC
Yes, consider the 13.11.2002 diffs reviewed.
Comment 29 David Konecny 2002-11-29 18:49:31 UTC
Integrated into NB341.
Comment 30 Jesse Glick 2002-12-20 15:06:34 UTC
*** Issue 29670 has been marked as a duplicate of this issue. ***
Comment 31 Patrick Keegan 2003-03-03 23:15:55 UTC
Removing RELNOTE keyword since this is not a problem in release35
Comment 32 Quality Engineering 2003-06-30 14:46:38 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.