navigation feature: ctrl click to suggest going to overriden method when appropriate
could this possibly be useful?
Description by simple example:
you edit a class that extends JFrame and some method
calls setVisible(true)
You get into setVisible (ctrl-click) to see the source.
It goes to java.awt.Component.setVisible,
you continue going into show(boolean) which calls
show() if boolean=true
And here comes the feature request:
IDEA could keep track that you came from a class extending
JFrame and suggest you to go into Window.show()
instead of Component.show()
Because when tracking that code, you are proably looking at the wrong place when you look into Component.show()
what do you think?
Please sign in to leave a comment.
Cool! +10
Jens
That sounds useful although I could see that it may be a bit confusing.
My current workaround is that once I get to the Component.show() method
I click on the "is overridden in subclass" icon and navigate to the
method that I want. That does mean that you need to keep track of where
you want to go, in your head, but most of the time that is sufficient.
Perhaps, it would be appropriate to follow your suggestion only when
"show inherited members" is selected in the Structure view.
Or perhaps, there should be a similar option to "show inherited members"
in the source editor. That way, in your example, as you navigate
through your method calls you don't actually leave your original class.
Tim
Michael Damberger wrote:
Michael Damberger wrote:
Just remap ctrl+click mouse shortcut to "Go to implementation" action.
--
Maxim Shafirov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Maxim Shafirov (JetBrains) wrote:
Or use the default (I think?) Ctrl-Alt-Left Click shortcut for "Go to
implementation".
Ciao,
Gordon
--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001
Let's throw a few more key presses in it so now one will ever find it :)
R
well, almost - but not quite.
In Component.show(boolean) ctrl-alt-click on show()
and there is a list to choose from, where you will
have to know that the one from Window is the right one.
Feature request is to suggest Window directly,
because of the fact that class extending Window is
source point of ctrl-clicking ;)
I agree that it might be a problem to find out the
"source point".