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 183417 - Allow "go to type" to prefer selected type (fqn)
Summary: Allow "go to type" to prefer selected type (fqn)
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2010-04-02 17:59 UTC by err
Modified: 2010-04-06 08:06 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description err 2010-04-02 17:59:51 UTC
Same thing happens with "go to source", context menu over an identifier...

(but there are examples when the ide can find the source file)

For example, in a java file there is

    import com.sun.source.util.TreeScanner;

In the Go to Type dialog if I type in
there are two choices
    TreeScanner (
    TreeScanner (com.sun.source.util)           <<<<<<<<< selected

when the second is selected in the editor get a tab labeled with and the popup on the tab is


and all the methods have

    //compiled code
    throw new RuntimeException("Compiled Code");

HOWEVER, if I am at a breakpoint and Treescanner is in the stacktrace, and I double-click on TreeScanner in the stack I get real source, the popup has
        in .../jdk1.6.0_18/
Comment 1 Tomas Zezula 2010-04-02 18:07:45 UTC
The GoTo type dialog uses just selected token, it does not have context to be able to do attribute in file. It supports java, c++, ruby, and other. Choosing the right type is up to you.
Anyway we can create some SPI to allow such a type resolution by the providers.
Comment 2 err 2010-04-02 19:49:07 UTC
Could you help me understand this.

> Choosing the right type is up to you.

Do you mean me the user, or some other part of the system?

If it is some other part of the system, for example some part of the java subsystem, then maybe this is a bug against that.

If it is me, then how do I choose the right type?
Comment 3 Tomas Zezula 2010-04-06 08:06:30 UTC
>Do you mean me the user, or some other part of the system?
The enhancement is about preferring the imported types. The system should.