Jump to declaration with ctrl + left-click

Answered

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

7 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
Comment actions Permalink

Ten years later same problem: 

A fresh install of Linux Mint 20 Cinnamon with a fresh install(via toolbox) of rubymine(imported settings from recent Rubymine version on mint 18), goland, phpstorm.

In all IDEs:

- the strg+left klick does not work

- strg+b works just fine

- strg and carret on the symbol turns on the blue link and the info-bubble appears. 

i have a MX master connected via bluethooth and unifying receiver, which makes no difference. I also searched all of the default system shortcuts in linux mint but did not find anything. My colleague has the same setup without probs, only on a different Laptop (Dell Precision vs Dell XPS).

Besides i also looked into the custom keymap xml, changed the keymaps but nothing changed.

 

0
Comment actions Permalink

Hello,

Please report new issue on YouTrack: https://youtrack.jetbrains.com/issues/IDEA attaching idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue. Is "strg+left klick" action detected in "Settings | Keymap | Find Action by Shortcut"?

0
Comment actions Permalink

Thanks yaroslav,

i reported the issue here: https://youtrack.jetbrains.com/issue/IDEA-245066

0

Please sign in to leave a comment.