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 205234 - Links in output window points to wrong files.
Summary: Links in output window points to wrong files.
Status: RESOLVED DUPLICATE of bug 203222
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 07:34 UTC by borre
Modified: 2011-11-21 17:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Counterexample (6.74 KB, application/zip)
2011-11-18 16:22 UTC, Jesse Glick
Details
Counter counterexample (54.04 KB, application/zip)
2011-11-21 07:09 UTC, borre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description borre 2011-11-17 07:34:36 UTC
When working on different svn branches the links in the output window points to the correct file, but the wrong branch/location.
Comment 1 borre 2011-11-17 07:36:19 UTC
The same thing also happens when using the search field and choosing "go to type"...
Comment 2 Tomas Zezula 2011-11-18 08:40:05 UTC
Works for me in dev (NB 7.1) build.
The output window (JavaAntLogger) uses the project classpath. When you execute project (test project) the project classpath is used to resolve the stack trace elements. Only in case that the class is not found on the project classpath the fallback (all classes IDE knows about) is used.

The Go To Type shows both types when two version of same project is opened, in the Location text field is the absolute path to file in which the class is declared.
Comment 3 borre 2011-11-18 09:21:14 UTC
I use maven and NetBeans 7.0.1.
Comment 4 Tomas Zezula 2011-11-18 10:18:48 UTC
What I've described in previous comment holds for Ant projects.
Please fill the maven specific issues on projects/maven.
Comment 5 Jesse Glick 2011-11-18 16:22:35 UTC
Created attachment 113327 [details]
Counterexample
Comment 6 Jesse Glick 2011-11-18 16:24:19 UTC
The output window processor for Maven projects also takes into consideration which project the build was run on, and only searches in that project's classpath, regardless of what projects are open. If you unzip the attached parent project and open its two modules, you can try running (or testing) either of them and following the hyperlinks; the appropriate source file is always opened, though the FQN is the same.
Comment 7 borre 2011-11-21 07:09:01 UTC
Created attachment 113354 [details]
Counter counterexample

Do the following (I'm not sure if all this is necessary, but it was what I did):
1:unzip and add to svn
2:make a branch in svn - f.ex postfix with _BRANCH
3:open the original in NetBeans and build it.
4:expand the modules folder and open the app sub module - run it. Click on the line in the output window displaying the Exception. The correct file opens.
5:close the two projects - the file with the error remains open.
6:fetch the _BRANCH from svn, open it, build, open app module and run.
7: click on the line in the output window displaying the Exception. The focus goes to the file already opened (which belongs to the other branch).

Hope this helps in correcting the bug :-)
Comment 8 Jesse Glick 2011-11-21 17:00:19 UTC
Be sure to close all projects from the previous branch, and then open the POM project from the new branch, not just a single module. Otherwise the IDE cannot be sure which source project should correspond to util-1.0-SNAPSHOT.jar.

*** This bug has been marked as a duplicate of bug 203222 ***