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 216448 - Go to Type does not attach correct sources when multiple versions of class available among open projects
Summary: Go to Type does not attach correct sources when multiple versions of class av...
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Jump To (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-06 16:07 UTC by Jesse Glick
Modified: 2013-01-18 18:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-08-06 16:07:26 UTC
I have a number of Maven projects open which refer (directly or transitively) to different versions of jenkins-core.jar, so when I go to "Jenkins" I am shown five different versions of jenkins.model.Jenkins; the Location field specifies the actual version. But whichever one I pick, I am taken to the same jenkins-core-*-sources.jar.

Workaround: navigate to the desired class using the Dependencies node in the Maven project using the desired version. Then Attach Sources to open its real (not generated) sources. Thereafter Go to Type will open this version directly. (In other words, the bug is apparently that GtT fails to call SourceJavadocAttacher when it needs to, but rather picks another source version arbitrarily.)
Comment 1 Jesse Glick 2012-10-02 14:47:11 UTC
Significant usability issue when moving back and forth between different branches/tags of a Maven project with lots of dependencies, some of them conflicting among subprojects.

Another workaround is to navigate using Ctrl-B or the like, if you can.
Comment 2 Tomas Zezula 2012-10-29 16:59:58 UTC
Jesse, can you provide a link to repository or simple steps how to set up such a scenario?
Or if I attach a patch can you test it?
Thanks
Comment 3 Tomas Zezula 2012-11-06 10:21:57 UTC
Maybe fixed.
Fixed jet-main 7287144dbcd9

There is a problem in classpath reported by the mvn for a binary root. It may contain other roots that hide the type in given root. The fix does not use CP..gCP(root,ClassPath.COMPILE) it just create an artificial classpath containing just the root to prevent hiding.
Comment 4 Jesse Glick 2013-01-18 18:12:22 UTC
Appears to be working fine in 20130114-e606b9a8fc60, thanks.