Jump to declaration with ctrl + left-click

Hi,

I'm using IntelliJ for a Grails project that contains a mixture of Groovy and Java code. I have the Eclipse keymappings turned on and the VIM plugin installed (and active). When the cursor is over a reference (class, method, etc), I can press F3 to jump to the declaration. I used to be able to do this by holding down ctrl and clicking on an a reference, but it no longer seems to work. Is there a setting somewhere to enable this?

Thanks,
Don

3 comments
Comment actions Permalink

Which reference is it exactly? Does Goto Declaration work on this very
reference? Does Find Usages in File work? If you enable 'highlight
usages of element at caret' option, will it work with that reference?

0
Comment actions Permalink

For example, in the following class:

public class Foo {

    private Bar bar;

    public Foo(Bar bar) {
        this.bar = bar;
    }
}

If I put the caret on Bar and press F3 it will jump to that class' definition. The 'highlight usages of element at caret' option also works. The behaviour I'm seeking is that if I click on Bar while CTRL is pressed, the editor jumps to the class definition (just as it does now when F3 is pressed), is it possible to do this?

Thanks,
Don

0
Comment actions Permalink

Hello Don,

The mouse click uses the same keyboard modifier as the "Goto declaration"
action. So this won't work if you have remapped the action from Ctrl-B to
F3. You need to keep Ctrl-B as the first shortcut for the action - then it
will work.

For example, in the following class:

public class Foo {

private Bar bar;

public Foo(Bar bar) {
this.bar = bar;
}
}
If I put the caret on Bar and press F3 it will jump to that class'
definition. The 'highlight usages of element at caret' option also
works. The behaviour I'm seeking is that if I click on Bar while CTRL
is pressed, the editor jumps to the class definition (just as it does
now when F3 is pressed), i

s it possible to do this?

Thanks,
Don
---
Original message URL:
http://www.jetbrains.net/devnet/message/5238842#5238842

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.