Filtering Ctrl+N and Ctrl+Alt+B

I badly want to be able to filter CtrlN and CtrlAlt+B and similar things by
module, package, and so on. I can't think of a good UI for it though, to make it
fast and easy and worth the effort of filtering. Does anyone here have ideas for
how it could be implemented?

6 comments
Comment actions Permalink

I badly want to be able to filter Ctrl+N



see:
"Ctrl-N : accept package in pattern."
http://www.jetbrains.net/jira/browse/IDEABKL-2994


Alain

0
Comment actions Permalink

I've long held that completion and auto-import should be constrained by the dependency rules. That way I could type in "List foo;" and not be directed to java.awt.List, which is always annoying. Constraining CtrlN in the same way seems reasonable, but could be frustrating. I'm not sure of the point of constraining the CtrlB family would be. By definition, Ctrl+B works in circumstances where there a reference has already been resolved to a single referent, yes? Given that the reference has already resolved, why would you want to be blocked in navigating to the referent?

Maybe I'm missing something, or don't understand your use case.

--Dave

0
Comment actions Permalink

And don't limit this to classes. I put in a request a long while ago for filtering by module for regular file names. Really easy use case: build.xml. We have some forty modules in our project, each with build.xml and install.xml. Finding the right one is really annoying.

I don't understand really why <mod|package|etc.>XYZ could not work. Of course, I don't know the code....but an answer would be nice. My original suggestion went completely unanswered.

0
Comment actions Permalink

Alain Ravet wrote:

>> I badly want to be able to filter Ctrl+N



see:
"Ctrl-N : accept package in pattern."
http://www.jetbrains.net/jira/browse/IDEABKL-2994


Alain


That's not enough, I want to filter by library or module, not just by package.

0
Comment actions Permalink

Dave Griffith wrote:

I've long held that completion and auto-import should be constrained by the
dependency rules. That way I could type in "List foo;" and not be directed
to java.awt.List, which is always annoying. Constraining Ctrl+N in the same
way seems reasonable, but could be frustrating. I'm not sure of the point of
constraining the CtrlB family would be. By definition, CtrlB works in
circumstances where there a reference has already been resolved to a single
referent, yes? Given that the reference has already resolved, why would you
want to be blocked in navigating to the referent?

Maybe I'm missing something, or don't understand your use case.

--Dave


Dependency rules wouldn't help me. I don't want to exclude the classes from
being used, I only want to narrow down the list so I can find what I want,
whether it's my code, IDEA code, openapi code, etc.

CtrlAltB shows implementations. I'm in GeneratedItem and I want to jump to
my definition of GeneratedItem. I don't want to see the 50 implementations in
idea.jar and openapi.jar.

0
Comment actions Permalink

And don't limit this to classes. I put in a request
a long while ago for filtering by module for regular
file names. Really easy use case: build.xml. We
have some forty modules in our project, each with
build.xml and install.xml. Finding the right one is
really annoying.

I don't understand really why <mod|package|etc.>XYZ
could not work. Of course, I don't know the
code....but an answer would be nice. My original
suggestion went completely unanswered.




I think in general, IDEA would do better to have more filtering. For example, ctrl-N, I might only want to look at classes that are not test classes.

There are other places where I want this control too:

http://www.jetbrains.net/jira/browse/IDEABKL-3015

But at the same time, be very careful. For example, when I do a find usages, and I wasn't finding any usages of a method (turns out I had filtered out the useful usages).

It's an interesting UI problem, balancing the control with the presentation to make sure users aren't given so much rope that they hang themselves.

Mike

0

Please sign in to leave a comment.