Is there a Show Declaration?

I know there is a Goto Declaration, but is there is a Show Declaration?

What I am looking for is something like the Crtl-Q, but instead, brings up a popup window for the class(even if it is the class you are already in, and focused on the declaration in question.

There would be no error checking, new tab opened, etc. Just a simple pop-up box, that you could scroll through(and maybe use for additional Show Declarations) which will go away when you are done with it.

9 comments

Have you tried holding down the key while the mouse is over the instance in question? The tooltip then shows the declaration of the instance. (You can then go to this line by clicking the mouse on the instance while holding the ]]> key.)

0

In article <9046049.1067437309586.JavaMail.javamailuser@localhost>,
zmbs <no_mail@jetbrains.com> wrote:

I know there is a Goto Declaration, but is there is a Show Declaration?

What I am looking for is something like the Crtl-Q, but instead, brings up a
popup window for the class(even if it is the class you are already in, and
focused on the declaration in question.

There would be no error checking, new tab opened, etc. Just a simple pop-up
box, that you could scroll through(and maybe use for additional Show
Declarations) which will go away when you are done with it.


There's a feature request for it. There's also a plugin that I think
does what you want: <http://www.intellij.org/twiki/bin/view/Main/ContextViewerPlugin>

0

zmbs wrote:

I know there is a Goto Declaration, but is there is a Show Declaration?

What I am looking for is something like the Crtl-Q, but instead, brings up
a popup window for the class(even if it is the class you are already in,
and focused on the declaration in question.


What is wrong with Ctrl+B then? Why do you want a popup window with
declaraton?


There would be no error checking, new tab opened, etc. Just a simple
pop-up box, that you could scroll through(and maybe use for additional
Show Declarations) which will go away when you are done with it.


Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

This is fine for looking at a simple variable declaration and such, but what I am more interested in is seeking method declaractions and the code that goes with them.

0

I can counter with why open up a complete tab(or have the code scroll to another part of the program) when all I want to do is take a peak at the code.

The idea is, instead of jumping all around, opening tabs that will need to be closed(especially for classes that you can't even edit), you get a nice pop-up(like you can with java docs) so that you can take a quick peak at the declaration and/or the method and code, without losing focus on what you are working on.

You could advance the idea a little, and allow the user to scroll up and down the code in the pop-up and even include an option to goto(open) the declaration, if they wanted to.

I would probably make something like this the default action for my middle button.

Basically, the idea is, bring the information I want to see to me, don't take me away from what I am doing just to see that information. As I said, this is just a variation of what you can do with ctrl-q, but instead of seeing the javadocs you see the actual code.

0

zmbs wrote:

I can counter with why open up a complete tab(or have the code scroll to
another part of the program) when all I want to do is take a peak at the
code.


Are you aware of CtrlAltLeft? This shortcut brings you back to where
you've come from. In situations you describe, I usually do a quick Ctrl+B,
then (almost) immediately CtrlAltLeft. It is fast enough so that I do not
lose focus. Have you tried that?

Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Yes, I have, though I do it with the mouse instead of the keyboard.

Anyway, forget I mention it.

0

Dmitry Lomov (JetBrains) wrote:

zmbs wrote:

>>I can counter with why open up a complete tab(or have the code scroll to
>>another part of the program) when all I want to do is take a peak at the
>>code.


Are you aware of CtrlAltLeft? This shortcut brings you back to where
you've come from. In situations you describe, I usually do a quick Ctrl+B,
then (almost) immediately CtrlAltLeft. It is fast enough so that I do not
lose focus. Have you tried that?


it works, but with the problem that you have another tab added to the
growing pile at the bottom of your window. when you've wandered off your
editor, it makes navigating back that much harder.

i can live with things the way they are now, but i would certainly
appreciate the kind of feature requested. i know, it may be difficult -
can quickly grow to an editor within an editor, with requests for syntax
highlighting and all the jazz in the popup.

sumit.


Friendly,
Dmitry


0

Sumit Kishore wrote:

Dmitry Lomov (JetBrains) wrote:

>> zmbs wrote:
>>
>>
>>>I can counter with why open up a complete tab(or have the code scroll to
>>>another part of the program) when all I want to do is take a peak at the
>>>code.
>>
>>
>> Are you aware of CtrlAltLeft? This shortcut brings you back to where
>> you've come from. In situations you describe, I usually do a quick
>> CtrlB, then (almost) immediately CtrlAlt+Left. It is fast enough so
>> that I do not lose focus. Have you tried that?


it works, but with the problem that you have another tab added to the
growing pile at the bottom of your window. when you've wandered off your
editor, it makes navigating back that much harder.

i can live with things the way they are now, but i would certainly
appreciate the kind of feature requested. i know, it may be difficult -
can quickly grow to an editor within an editor, with requests for syntax
highlighting and all the jazz in the popup.


BTW I prefer to use IDEA in 'one editor' mode. I set 'Editor Tabs Limit' to
1, so every new file I open effectively replaces the one currently opened
in editor window. I use Ctrl+E (Recent files) to navigate between the
recently opened files.

I find this way extremely convenient. As speed search works in Ctrl+E, I do
not need to touch mouse to navigate to recent files, and my display is not
clattered with editor tabs.

Cheers,
Dmitry

--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.