禁用 Eclipse ctrl-click

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4387450/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:47:43  来源:igfitidea点击:

Disable Eclipse ctrl-click

eclipse

提问by dascandy

I'm very used to having Ctrl-click select the word below my cursor and in Eclipse the authors seem to think it's better to make it move to the definition. I disagree, but can't find how/where to fix this. Searching on the internet and on here as well leads to hundreds of people wanting Eclipse-style Ctrl-click everywhere - I want to get rid of it.

我非常习惯使用Ctrl-click 选择光标下方的单词,而在 Eclipse 中,作者似乎认为最好将其移至定义处。我不同意,但找不到如何/在哪里解决这个问题。在互联网上和这里搜索也会导致数百人想要 Eclipse 风格的Ctrl- 到处点击 - 我想摆脱它。

How?

如何?

回答by Kane

Go to Window- Preferences- General- Editors- Text Editors- Hyperlinkingpreference page,

转到窗口-首选项-常规-编辑器-文本编辑器-超链接首选项页面,

uncheck the option Open Declaration

取消选中打开声明选项

回答by Ronan

For the selection part:

对于选择部分:

I use AutoHotKeywith the following script:

我将AutoHotKey与以下脚本一起使用:

#IfWinActive ahk_class SWT_Window0
^~LButton::Send !+{Up}

The first line makes sure the macro is only run when eclipse (SpringSource Tool Suite in my case) is active. Use AHK's built-in 'Window Spy' to check the window class for different IDEs.

第一行确保宏仅在 eclipse(在我的情况下为 SpringSource Tool Suite)处于活动状态时运行。使用 AHK 的内置“Window Spy”来检查不同 IDE 的窗口类。

The second line sends Alt+Shift+Up(default select word shortcut) when you Ctrl+Click in the IDE

第二行发送Alt+ Shift+ Up(默认选择Word快捷方式)当您Ctrl+单击IDE

回答by Jaseem Ambalangadan

Close Eclipse.

关闭日食。

Delete: /path/to/workplace/.metadata/.plugins/org.eclipse.jdt.core

删除:/path/to/workplace/.metadata/.plugins/org.eclipse.jdt.core

Open eclipse and let it rebuild its indexes. Job done.

打开 eclipse 并让它重建它的索引。任务完成。