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 217187

Summary: Patch to Support FQN in "Go to type"-dialog
Product: java Reporter: markiewb
Component: NavigationAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: markiewb, mjanicek
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Proposed patch including unittest
Screenshot which shows the new feature

Description markiewb 2012-08-21 23:56:07 UTC
In the "Go to type"-dialog i want to type (or paste) a fully qualified name, but i does not work.

For example type "java.util.Collections"

ACTUAL: No search result
EXPECTED: Collections is found and shown as "Collections (java.util)"
Comment 1 markiewb 2012-08-22 00:15:50 UTC
Created attachment 123369 [details]
Proposed patch including unittest
Comment 2 markiewb 2012-08-22 00:18:38 UTC
Created attachment 123370 [details]
Screenshot which shows the new feature
Comment 3 Tomas Zezula 2012-09-05 09:19:46 UTC
I will integrate it into NB 7.3.
I need to look how other IDEs are handling it.
I doubt that the patch can be as simple as it's now.
For example:
"java.util.AL" should give java.util.AbstractList but it does not.
Ideally also "j.u.AL" should work.
Comment 4 Tomas Zezula 2012-09-05 14:10:33 UTC
I've changed a patch a bit to support the cases described in comment #3.
I also changed the query to rather do list of all packages, it should be faster than doing getDeclaredTypes() with non existent package.

But it's rather hack. Ideally the generic infrastructure should know what is package and what is simple name. It cannot find it itself as it's generic (non java), so additional API is needed. I will extend the API.
The API extension will remove some code I've needed to add to JavaTypeProvider and also allow the fqn names to be highlighted.
Comment 5 Tomas Zezula 2012-09-05 16:28:54 UTC
Fixed jet-main 5436de8d59fe

For now done without the API extension as I've described above.
When the API gets over the API integration process I will rewrite it.

Thanks for the path.
Comment 6 Quality Engineering 2012-09-07 02:09:30 UTC
Integrated into 'main-golden', will be available in build *201209070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5436de8d59fe
User: Tomas Zezula <tzezula@netbeans.org>
Log: #217187:Patch to Support FQN in "Go to type"-dialog
Comment 7 Martin Janicek 2012-10-11 13:08:13 UTC
*** Bug 219913 has been marked as a duplicate of this bug. ***