Method Hierarchy from inside a child class
Answered
Hi,
It seems that viewing the method hierarchy from inside the child class doesn't work. If a child class overrides a method, viewing the method hierarchy with 'Ctrl + shift + H' doesn't show the parent class. However it works from inside the parent class. The 'Ctrl + Alt + B' also is the same.
Switching from Eclipse to Intellij Idea, if in Eclipse I select a method in a sub class and press 'Ctrl-T', it shows all the super types with the same method signature. Is there similar short cut key in Intellij Idea that does the same thing from inside the sub class.
Thanks,
Ali Sadri.
Please sign in to leave a comment.
Did you try to toggle views? https://www.jetbrains.com/help/idea/viewing-hierarchies.html#d908510e114
Thanks for your reply.
Toggle views works from the parent class.
In the Eclipse, having the following two classes:
public class MyClassA {
public int method1(){
return 0;
}
}
public class MyClassB extends MyClassA{
@Override
public int method1() {
return 1;
}
}
if I select method1 in the sub class (MyClassB) and press Ctrl + t , I see the following:
This is what I was looking for. I tried this in IntellijIdea (with toggle views) and only works in the parent class.
I want to see all the types implementing (or defining) that method signature from inside the sub class.
Does IntellijIdea has any short-cut for this without navigating to parent class?
By the way, I tried both 'Ctrl + Alt + B', and 'Ctrl + Alt + H' from inside the sub class.
'Ctrl + Alt + B' from inside the sub class says no implementations found and 'Ctrl + Alt + H' as I mentioned in my previous post only works from the parent class.
Please vote for https://youtrack.jetbrains.com/issue/IDEA-110828.
pls do it
This is still not fixed. A feature described above is available in Eclipse.
Try 2019.3: https://confluence.jetbrains.com/display/IDEADEV/IDEA+2019.3+EAP .