Bug 217187 - Patch to Support FQN in "Go to type"-dialog
Patch to Support FQN in "Go to type"-dialog
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Navigation
7.2
PC Windows 7
: P3 (vote)
: 7.3
Assigned To: Tomas Zezula
issues@java
:
: 219913 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-21 23:56 UTC by markiewb
Modified: 2012-10-11 13:08 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Proposed patch including unittest (24.27 KB, patch)
2012-08-22 00:15 UTC, markiewb
Details | Diff
Screenshot which shows the new feature (33.55 KB, image/png)
2012-08-22 00:18 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo