10 Replies Last post: Feb 6, 2013 6:49 PM by Denis Zhdanov  
Alex Tsimashenka Newbie 6 posts since
Feb 5, 2013
Currently Being Moderated

Feb 5, 2013 10:24 PM

No implementations found

I have maven project with two modules and parent pom.xml. In the first module I have interface, in the second - implementation. If I import the first module, open interface and press Ctrl+Alt+F7 - I see that "No implementations found". Why can't Idea (version 12.0.3) find implementation in the second module?

 

Please see screenshots:

 

1) Interface in the imported module.

 

interface.jpg

 

2) Implementation:

implementation.jpg

Denis Zhdanov JetBrains 1,514 posts since
Oct 20, 2007
Currently Being Moderated
Feb 5, 2013 10:51 PM in response to: Alex Tsimashenka
Re: No implementations found

Hi Alex,

 

Could you provide a sample project which illustrates the problem?

 

Denis

Denis Zhdanov JetBrains 1,514 posts since
Oct 20, 2007
Currently Being Moderated
Feb 6, 2013 11:20 AM in response to: Alex Tsimashenka
Re: No implementations found

Thanks for the samle. The answer is that 'Find usages' looks for usages and implementation is not considered to be a usage. For example, you can add the following method to A1Impl class at your sample:

 

 

public void test(A1 a) {
  a.a1();               
}                       

 

Then 'Find Usages' will locate it. Alternatively, you can invoke 'Find Usages Settings' (mapped to Ctrl+Alt+Shift+F7 at the default keymap, also available via Main Menu | Edit | Find | Find Usages Settings). It allows to specify that implementation methods should be chosen as well:

 

find.png

Please note that there is a dedicated action to quickly show list of all overriding methods - 'Navigate to Implementation (s)' (Ctrl+Alt+B at the default keymap, also available via Main Menu | Navigate | Implementation (s)). It also works for class hierarchy down traversal.

 

Denis

Denis Zhdanov JetBrains 1,514 posts since
Oct 20, 2007
Currently Being Moderated
Feb 6, 2013 3:20 PM in response to: Alex Tsimashenka
Re: No implementations found

I'm afraid I don't understand the problem. 'Find Usages Settings' works fine at the sample project you attached if 'Implementing methods' box is checked. 'Project and Libraries' scope is also available for selection at 'Find Usages Settings' dialog at the sample project.

 

Denis

Denis Zhdanov JetBrains 1,514 posts since
Oct 20, 2007
Currently Being Moderated
Feb 6, 2013 6:49 PM in response to: Alex Tsimashenka
Re: No implementations found

Reproduced the problem, thanks. Created a ticket - IDEA-100571.

 

Denis

Denis Zhdanov JetBrains 1,514 posts since
Oct 20, 2007
Currently Being Moderated
Feb 6, 2013 3:33 PM in response to: Alex Tsimashenka
Re: No implementations found

Can't reproduce that locally. Could provide a sample project for that problem?

 

Denis

More Like This

  • Retrieving data ...