Go To->Symbol does not find interface implementations


It seems that Ctrl-Shift-Alt-N does not find module method that are implementations
of an external interface.

For instance, one of my project classes is a ServletContextListener implementation,
containing the following methods:

public void contextInitialized(ServletContextEvent servletContextEvent)
public void contextDestroyed(ServletContextEvent servletContextEvent)
public void contextDestroyed2()
public void contextDestroyed3()

When I go Go To->Symbol for pattern "contextD", I get the following matches:

public void contextDestroyed2()
public void contextDestroyed3()

Is this the way GoTo->Symbols has always worked, or is this broken in #3354?


3 comments
Comment actions Permalink

It always used to work this way, only the roots of overriding hierarchy are
displayed. This was done not to clutter UI with too many methods.
However as another option we could provide a tree-like popup with
implementations, or at least make ctrl-alt-B work from the open popup.
What do you think?

Eugene.

"Taras Tielkes" <taras.tielkes@gmail.com> wrote in message
news:ae766d063bc98c73cc1ae562da0@news.intellij.net...
>

It seems that Ctrl-Shift-Alt-N does not find module method that are

implementations

of an external interface.

>

For instance, one of my project classes is a ServletContextListener

implementation,

containing the following methods:

>

public void contextInitialized(ServletContextEvent servletContextEvent)
public void contextDestroyed(ServletContextEvent servletContextEvent)
public void contextDestroyed2()
public void contextDestroyed3()

>

When I go Go To->Symbol for pattern "contextD", I get the following

matches:
>

public void contextDestroyed2()
public void contextDestroyed3()

>

Is this the way GoTo->Symbols has always worked, or is this broken in

#3354?
>
>


0
Comment actions Permalink

I think ctrlaltb and also a right-click context menu would be best.

Eugene Vigdorchik (JetBrains) wrote:

It always used to work this way, only the roots of overriding hierarchy are
displayed. This was done not to clutter UI with too many methods.
However as another option we could provide a tree-like popup with
implementations, or at least make ctrl-alt-B work from the open popup.
What do you think?

Eugene.

"Taras Tielkes" <taras.tielkes@gmail.com> wrote in message
news:ae766d063bc98c73cc1ae562da0@news.intellij.net...

>>It seems that Ctrl-Shift-Alt-N does not find module method that are


implementations

>>of an external interface.
>>
>>For instance, one of my project classes is a ServletContextListener


implementation,

>>containing the following methods:
>>
>>public void contextInitialized(ServletContextEvent servletContextEvent)
>>public void contextDestroyed(ServletContextEvent servletContextEvent)
>>public void contextDestroyed2()
>>public void contextDestroyed3()
>>
>>When I go Go To->Symbol for pattern "contextD", I get the following


matches:

>>public void contextDestroyed2()
>>public void contextDestroyed3()
>>
>>Is this the way GoTo->Symbols has always worked, or is this broken in


#3354?

>>


0
Comment actions Permalink

Hello Eugene,

It always used to work this way, only the roots of overriding
hierarchy are
displayed. This was done not to clutter UI with too many methods.
However as another option we could provide a tree-like popup with
implementations, or at least make ctrl-alt-B work from the open popup.
What do you think?


Thanks for clarifying. I have never been a 'heavy user' of Ctrl-Shift-Alt-N,
but am I finding myself using it more and more.

I guess it's all a question of selectivity: "What method of searching, combined
with CamelHumps pattern of minimal length, will take me to the destination
quickest?".

Sometimes it's efficient to search for some specific method name. My own
pattern in this case was:
1) There's an well-known public interface (HandlerInterceptor from Spring
Framework)
2) It has three methods whose signature I can recall without thinking
3) I know I have a handful of implementations in my project, but I haven't
touched them for a while so I'm not sure about the class names
4) I'm looking for one of these implementations

So I started typing 'preHandle' (one of the interface methods) and was surprised
not to see some of my classes.

However, now that I have heard the explanation I understand better.

Some questions:

1) How would Ctrl-Alt-B work from the popup? Would it change the content
of the popup, or would it open a second popup, similar to the regular Ctrl-Alt-B
one?

2) Could you describe how the tree-like popup would work?

After a few months of increased GoTo->Symbol usage, I'm still using it. While
it has a higher startup latency (millisecs to first result), if can bring
you to the destination in one single step (if symbol pattern selectivity
is high enough).

In this context, I can't restrain myself from linking to these all-time pet
peeves of mine:

"Filter certain packages from the alt-enter import mechanism. (eg sun.*)"
http://www.jetbrains.net/jira/browse/IDEA-1524

"Don't offer a class for importing if a dependency rule forbids it"
http://www.jetbrains.net/jira/browse/IDEABKL-2783

The functionality of marking libraries 'runtime-only' would increase the
effectivity of all types of GoTo: Ctrl-N, Ctrl-Alt-N and Ctrl-Shift-Alt-N


0

Please sign in to leave a comment.