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 181770 - [69cat] Go to Type now lists classes inside output jar files for free form projects
Summary: [69cat] Go to Type now lists classes inside output jar files for free form pr...
Alias: None
Product: java
Classification: Unclassified
Component: Freeform (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Michel Graciano
Depends on:
Reported: 2010-03-10 08:54 UTC by Michel Graciano
Modified: 2010-03-19 17:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Project.xml from problematic project (16.02 KB, text/xml)
2010-03-10 08:54 UTC, Michel Graciano
Test project (1.59 KB, application/octet-stream)
2010-03-17 10:18 UTC, Tomas Zezula
Bugged test project (6.62 KB, application/octet-stream)
2010-03-17 12:57 UTC, Michel Graciano

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2010-03-10 08:54:19 UTC
Created attachment 94989 [details]
Project.xml from problematic project

Product Version: NetBeans IDE Dev (Build 100310-5af6a9204dc0)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Linux version 2.6.31-20-generic-pae running on i386; UTF-8; en_US (nb)

If I call the 'Go to Type' dialog and type the name of any class, 2 classes is shown to choose, both points to the same file. I can't reproduce it for 6.8.
Comment 1 Michel Graciano 2010-03-16 16:45:51 UTC
I increased the priority since it is an regression. I don't consider it an P1 since it still works as I expect but is terrible to see each class twice. It takes a lot of space at UI.
Comment 2 Tomas Zezula 2010-03-17 10:18:53 UTC
Created attachment 95276 [details]
Test project

Test project which works for me.
Comment 3 Tomas Zezula 2010-03-17 10:24:20 UTC
I've tried it and it works fine for me.
I've created a freeform project similar to your set up and classes are shown just once.
Please provide the test project or modify the attached project to show the problem.
I am not able to reproduce it in dev build.
Comment 4 Michel Graciano 2010-03-17 12:51:25 UTC
Well, now I am looking carefully I am sure I explained it incorrectly. First of all, sorry for this. The problem is we have an free form project with several source roots and one of them, A, depends of another one, B. We listed in the A classpath one of jar generated by B (B generates a lot of jars files), but this jar is not listed in B output (we just list in output what is needed to Matisse works correctly, since a lot of jars are created). In this case, the IDE in 6.9 lists classes twice since it is present in source root and in some classpath. I can't reproduce it in an small project yet but I will try it and post it here soon. For now, the workaround is list in classpath of A the same jar in the output of B so the classes at least for now is listed just once.
I decreased the priority since now it looks like some kind of problem related to complexity of our project. I think as soon as I can reproduce the problem you can decide if it is an valid bug or not.
Comment 5 Michel Graciano 2010-03-17 12:57:30 UTC
Created attachment 95282 [details]
Bugged test project

Well, to reproduce the problem you need to unzip the attached sample project, open it in the IDE. Maybe it will not work in first time if you already opened the working project before so you need to restart the IDE to "refresh" the classpath. Thanks for your help.
Comment 6 Tomas Zezula 2010-03-18 10:37:48 UTC
Thanks for the project. I am now able to reproduce it.
Unfortunately it's not a bug it's a feature :-)
The problem is that when there is no mapping among output jar and source root the IDE handles both sources and the output jar separately. So there are 2 types. In the NB 6.8 only one was added as the second has no source mapping (there was no sources attached and it was impossible to open it). The NB 6.9 added possibility to open a class file (like Idea - the method signatures of the class are shown) so the class file can be opened and it's offered by the go to type.
What is wrong is the order (the non project type is offered before the project source). This is a bug in the Go to type comparator. I am fixing this. After it both types will be added but the source should be before the class.
Comparator fixed in jet-main: f876d29c7b47
Comment 7 Quality Engineering 2010-03-19 05:12:15 UTC
Integrated into 'main-golden', will be available in build *201003190200* on (upload may still be in progress)
User: Tomas Zezula <>
Log: #181770:Go to Type now lists classes inside output jar files for free form projects
Comment 8 Michel Graciano 2010-03-19 17:27:33 UTC
If this is a feature so I need to fix my project :(
Thanks anyway for the clarification.