I am using IntelliJ IDEA and I have problem with method usage finding.
Suppose I have interface Worker.
public interface Worker {
void startWork();
void endWork();
}
And I have two implementations.
public class Develper implements Worker {
@Override
public void startWork() {
System.out.println("Developer Start Working");
}
@Override
public void endWork() {
}
}
public class Qa implements Worker {
@Override
public void startWork() {
System.out.println("QA start Work");
}
@Override
public void endWork() {
}
}
I open the Developer class and trying to find usages of startWork()
.
I want only to view usage of the Developer.startWork()
implemented method.
But when I find usages it shows both Developer and Qa.startWork()
method usages. How can I avoid Qa.startWork()
method usage when finding Developer.startWork()
usages?
Using Ctrl+Shift+Alt+F7 (⌘+⇧+⌥+F7 for Mac) should show the prompt from Jim Hawkins answer.
See: https://www.jetbrains.com/help/idea/find-usages-method-options.html
When you search for usages of a method implementation with this dialog Ctrl+Shift+Alt+F7, IntelliJ IDEA will ask whether or not you want to search for the base method. With any other find usages actions such as Alt+F7 or Ctrl+Alt+F7, the base method will be included in the search results automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With