Bug 3079 - [ExternalTools] Clicking on output should open resource
Summary: [ExternalTools] Clicking on output should open resource
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P2 enhancement (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
: 15386 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 22:49 EDT by Jeff McAffer CLA
Modified: 2003-01-20 21:34 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2001-10-10 22:49:05 EDT
*	there should be a way to navigate from the console output to the corresponding
	resource. For example, the user can select a javac error message and
	execute "Goto File" from the context menu.

NOTES:

FB (09/07/2001 4:36:44 PM)
	The above suggestion is from EG.
Comment 1 DJ Houghton CLA 2001-10-24 06:43:31 EDT
PRODUCT VERSION:
125


Comment 2 Rodrigo Peretti CLA 2002-05-18 11:20:36 EDT
Moving to Platform UI (External Tools). It would be a nice feature but it is 
not critical for 2.0.
Comment 3 Rodrigo Peretti CLA 2002-05-18 11:52:00 EDT
*** Bug 15386 has been marked as a duplicate of this bug. ***
Comment 4 Nick Edgar CLA 2002-05-19 00:06:13 EDT
This is actually fairly important.
Anything we can do here would be good, even if it means hardcoding knowledge 
about the format of Javac error messages.

(There is a dup PR for this).
Comment 5 Rodrigo Peretti CLA 2002-05-19 02:55:08 EDT
I believe messages here might depend on the compiler adapter. Sun's javac and 
JDT could be different. A common pattern could be tricky to find (although 
worth trying).
Comment 6 Aldo Eisma CLA 2002-05-22 06:14:56 EDT
If an error occurs during execution of the Ant file, a BuildException should be 
shown and reported, and it should show up in the Tasks view (as it used to) so 
that you can at least jump to the offending line in the Ant file.

In my view, it is the reposibility of the Ant task implementation to generate 
task-specific entries in the Eclipse Task view.
Comment 7 Max Rydahl Andersen CLA 2002-06-30 15:21:39 EDT
I have made a small addition to the Log console code and somewhat discussed it in the newsgroup. You 
can find the exact discussion by searching for "Ant problems (and where to report them)".

Im 
willing to share my patch and ideas if you are interested.

But I must say it must be worth 
looking into how CDT handle this issue - their mailing list seem to include discussion on how to 
generally parse an(y) compilers output via regular expression - just as Emacs, jedit, idea etc. 
can do it.

It should not be that hard to build into the external tools core.

Comment 8 Simon Arsenault CLA 2002-07-22 14:06:13 EDT
To be fixed in 2.0.1
Comment 9 Simon Arsenault CLA 2002-08-19 11:42:50 EDT
Code added by Ryan.
Comment 10 Simon Arsenault CLA 2002-08-21 14:36:12 EDT
We needed to roll back the changes on this. We cannot make use of the JDT code 
because external tool is part of the platform, and JDT is only part of the SDK.

Need to reinvestigate for 2.1
Comment 11 Simon Arsenault CLA 2002-09-06 14:18:14 EDT
By moving the debug console/process views into the platform, external tools 
could make use of it. And when JDT is present, it would handle the double click 
on java file request.
Comment 12 Darin Wright CLA 2002-11-15 10:33:47 EST
We currently support hyperlinks from output back to the associated task. 
However, we need to extend this support to take into consideration error output 
from javac to associated java code.

We also need to consider how we can support linking for other tasks (i.e. do we 
need an extension point to allow clients to register parsers/linkers for task 
specific output?)
Comment 13 Rodrigo Peretti CLA 2002-11-15 10:52:59 EST
An extension point would be interesting for tasks you do not have control over 
like the javac task or any other contributed by Ant (I believe there is a bug 
report related to that). If providing a solution like that we should make sure 
it scales well (e.g. a hundred listeners running but none associated with the 
current running tasks).
Comment 14 Darin Wright CLA 2002-12-04 14:04:04 EST
We have added support for parsing "javac" output. Errors are linked back to the 
associated ".java" file.
Comment 15 Darin Wright CLA 2002-12-05 10:08:01 EST
We do not yet have a task-based extension point (currently, we just have 
a "console line tracker" extension point supported by the debugger). There are 
some issues with an ant extension point - the implementation has to be on the 
ant classpath, etc. Moving to M5 for consideration with bug 26830.
Comment 16 Matthew Conway CLA 2002-12-10 17:30:26 EST
Is the parsing of javac output functional yet?  I can't get it to work using a
new project, all ant settings on defaults, and a simple buildfile which just
does a <javac srcdir="src"/> - the error shows up, but without a hyperlink for
it.  Hyperlinks only exist for the javac task back to the buildfile.

It would be nice if the jikes compiler's output was also supported by default. 
I'd imagine it would be a pretty common scenario for large projects due to the
drastic speed increase it provides to the development cycle.


Comment 17 Darin Wright CLA 2002-12-10 17:40:28 EST
The links may only work on the Sun compiler output format - have not tested 
with jikes.
Comment 18 Matthew Conway CLA 2002-12-10 18:04:08 EST
It looks like the string you are using to match an error isn't correct?  Or do I
have to configure the buildfile in some way to force the Sun java compiler from
within eclipse?  I tried setting the build.compiler property to "modern", and
had exactly the same results.

Here's the buildfile I was using, and the resulting output.
The match string, "*[javac]*ERROR in*.java*(at line*)*", doesn't appear in the
error output

src/Foo.java:
public class Foo {
	public static void main(String[] args) {
		blah;
	}
}

link.xml:
<project name="bar" default="all">
	<target name="all">
		<javac srcdir="src"/>
	</target>
</project>

Buildfile: D:\dev\eclipse\runtime-workspace\SimpleAnt\link.xml

all:
       [javac] Compiling 1 source file
       [javac] D:\dev\eclipse\runtime-workspace\SimpleAnt\src\Foo.java:12: not a
statement
       [javac] 		blah;
       [javac]                 ^
       [javac] 1 error
       [javac] BUILD FAILED:
file:D:/dev/eclipse/runtime-workspace/SimpleAnt/link.xml:6: Compile failed; see
the compiler error output for details.
Comment 19 Darin Wright CLA 2002-12-11 12:06:00 EST
Sorry, I was fooled. We parse output from the Eclipse Java Compiler.
Comment 20 Darin Wright CLA 2003-01-15 16:27:15 EST
Added support for parsing Jikes and Sun Javac error output. Fixed.
Comment 21 Darin Wright CLA 2003-01-15 16:27:46 EST
Please verify. (Code changes are in JavacLineTracker)
Comment 22 Darin Wright CLA 2003-01-20 19:59:28 EST
RE-open to re-assign
Comment 23 Darin Wright CLA 2003-01-20 19:59:57 EST
Darin, Jared is away this week, so I will assign this bug to you for 
verification.
Comment 24 Darin Wright CLA 2003-01-20 20:00:21 EST
Fixed. Please verify, Darin (S).
Comment 25 Darin Swanson CLA 2003-01-20 21:34:46 EST
Verified.