Ctrl+Alt+B - narrow down the list accoring to package name ?

Hello,

When I press CtrlAltB (Go To -> Implementations) currently there's no way to narrow down the list using the package name, one can only start typing the name of the class.
If there was a way to do so - I think it would be more comfortable to see right away various extensions of the given class. For example, in JSF when I VtrlAltB UIComponentBase I get a laundry list of various classes from different frameworks - Sun RI, RichFaces, Ajax4Jsf, ours (see the image attached) .. If I could start typing "org.richfaces" to narrow down the list in order to see, say, RichFaces components - this would make the lookup process much faster.

Thank you !



Attachment(s):
2.png
11 comments
Comment actions Permalink

This is just as applicable to the Go to class box... or maybe it already
supports packages and I don't know how to use it properly?

N.

Evgeny Goldin wrote:

Hello,

When I press CtrlAltB (Go To -> Implementations) currently there's no way to narrow down the list using the package name, one can only start typing the name of the class.
If there was a way to do so - I think it would be more comfortable to see right away various extensions of the given class. For example, in JSF when I VtrlAltB UIComponentBase I get a laundry list of various classes from different frameworks - Sun RI, RichFaces, Ajax4Jsf, ours (see the image attached) .. If I could start typing "org.richfaces" to narrow down the list in order to see, say, RichFaces components - this would make the lookup process much faster.

Thank you !


------------------------------------------------------------------------

0
Comment actions Permalink

Yes, I also think it may be applicable in all places where you may type the name of the class which includes Ctrl+N dialog, of course. No, I don't think you can specify the package somehow today ...

0
Comment actions Permalink

Hello Nathan,

This is just as applicable to the Go to class box... or maybe it
already supports packages and I don't know how to use it properly?


Packages are supported since 7.0. Just type the beginning of package name,
then dot and the beginning of the class name. For example:

ja.Strin

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Aha! I was trying the ja*.String approach, and that's why it wasn't
working :)
Thanks Dmitry.

Dmitry Jemerov wrote:

Hello Nathan,

>> This is just as applicable to the Go to class box... or maybe it
>> already supports packages and I don't know how to use it properly?


Packages are supported since 7.0. Just type the beginning of package
name, then dot and the beginning of the class name. For example:

ja.Strin

0
Comment actions Permalink

Very nice indeed, thanks for letting us know.
See the screenshots attached - while looking for "org.apache" - it doesn't find anything on "org.apa" expecting me actually to type "org.appen" (for various Appenders)



Attachment(s):
2.png
1.png
3.png
0
Comment actions Permalink

Hey, but CtrlAltB still doesn't support that :) Does it work for Ctrl+N only ?
I'm on build 7562.

0
Comment actions Permalink

Evgeny Goldin wrote:

Very nice indeed, thanks for letting us know.
See the screenshots attached - while looking for "org.apache" - it doesn't find anything on "org.apa" expecting me actually to type "org.appen" (for various Appenders)


I guess you should type "org.apa." (note extra .) to get all apache
classes...

N.

0
Comment actions Permalink

Amm .. right, "org.apa.App" works

0
Comment actions Permalink

Hello Evgeny,

Hey, but CtrlAltB still doesn't support that :) Does it work for
Ctrl+N only ? I'm on build 7562.


It works for Goto Class and Goto Symbol, but indeed not for Ctrl-Alt-B. A
JIRA issue for that is welcome.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Just discovered that feature and I actually find the way this has been implemented is quite nice.

Whatever you type seems to be broken down in 2 parts :
- the last token (after the last dot) is the Class pattern
- anything before that is broken down in patterns for packages, but you don't have to include all subpackages.

Example

u.Range will include java.util.regex.Range
as would j.util.Ran or reg.Range

This makes it quite powerful in terms of number of keystrokes needed to refine your search, well done again !

0

Please sign in to leave a comment.