Eclipse f3 未打开声明

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31838072/
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-09 05:34:51  来源:igfitidea点击:

Eclipse f3 not opening declaration

eclipsekeymappingmacos-sierra

提问by Roy Hinkley

I have Eclipse (Mars) web development tools installed on a MacBook Air. Recently, hitting f3 stopped opening the declaration.

我在 MacBook Air 上安装了 Eclipse (Mars) Web 开发工具。最近,按 f3 停止打开声明。

The key mapping in Eclipse (Mars) - web development tools:

Eclipse(Mars)中的按键映射——web开发工具:

enter image description here

在此处输入图片说明

In another Eclipse install (Luna) - Android development tools, where the f3 function is working, the key mapping is:

在另一个 Eclipse 安装 (Luna) - Android 开发工具中,f3 功能正在工作,键映射是:

enter image description here

在此处输入图片说明

What is wrong with the Mars version? What do I need to add to get it to work in the Java editor?

火星版有什么问题?我需要添加什么才能让它在 Java 编辑器中工作?

I have seen this post, but I don't have the exact same issue. Nothing happens when I hit f3.

我看过这个帖子,但我没有完全相同的问题。当我按下 f3 时什么也没有发生。

Additionally

此外

Other short cut keys work.

Opening the declaration with the context menu does work.

其他快捷键有效。

使用上下文菜单打开声明确实有效。

But there is no key short cut listed in the context menu.

但是上下文菜单中没有列出快捷键。

enter image description here

在此处输入图片说明

Did this key mapping change with Mars? In my Luna verion, the context menu has the key map listed:

这个键映射是否随着火星而改变?在我的 Luna 版本中,上下文菜单列出了键映射:

enter image description here

在此处输入图片说明

回答by Roy Hinkley

I've the same issue. You can use "Ctrl + Left mouse click" instead.

我有同样的问题。您可以改用“Ctrl + 鼠标左键单击”。

回答by gwnp

Make sure your function lock key is not pressed. I apparently hit mine and didn't notice given that F3 is the only function key I use.

确保您的功能锁定键未被按下。我显然击中了我的并且没有注意到 F3 是我使用的唯一功能键。

Seems stupid but this literally happened to me and the other suggestion didn't help.

看起来很愚蠢,但这确实发生在我身上,而另一个建议没有帮助。

回答by Kricket

I had the same issue after installing Apache Directory Studio.

安装 Apache Directory Studio 后我遇到了同样的问题。

Go to Window->Preferences, General->Keys. Filter for F3 and you'll see all the different ways that F3 is bound. I got it to work again by disabling F3 in the LDAP windows (i.e. deleting the binding).

转到窗口-> 首选项,常规-> 键。筛选 F3,您将看到 F3 绑定的所有不同方式。通过在 LDAP 窗口中禁用 F3(即删除绑定),我让它再次工作。

回答by Fergal Fitz

In eclipse marsgoto:

eclipse mars转到:

  • window
  • preferences
  • General
  • Keys to open the key mapping view.
  • type 'open declaration' in the filter text.
  • copy one of the commands that are already there Copy Command
  • Enter 'F3' in the Binding.
  • In the drop down menu of the combo box of 'When' select Editing
  • Then whatever Language You Are Using
  • Source
  • Apply
  • and press Ok
  • 窗户
  • 喜好
  • 一般的
  • 用于打开键映射视图的键。
  • 在过滤器文本中键入“打开声明”。
  • 复制已经存在的命令之一 Copy Command
  • 在绑定中输入“F3”。
  • 在“何时”组合框的下拉菜单中选择 Editing
  • 那么无论你使用什么语言
  • 来源
  • 申请
  • 然后按确定

回答by e.t.

Some suggestions to try:

一些尝试的建议:

1) Try creating a new workspace, and check if F3 works

1) 尝试创建一个新的工作区,并检查 F3 是否有效

2) Try switching to a different perspective

2)尝试切换到不同的视角

3) Try downloading a different eclipse release, maybe the java developers release, check that F3 works, then install whatever you need for web development.

3) 尝试下载不同的 Eclipse 版本,也许是 Java 开发人员版本,检查 F3 是否有效,然后安装 Web 开发所需的任何内容。

Good luck :)

祝你好运 :)

回答by leroneb

Looking at the comparison of the preferences that work vs what does not work, the issue is clear.

比较有效的偏好与无效的偏好,问题很明显。

  • Go to: Window/preferences/General/Keys to open the key mapping view.
  • Type 'Open declaration' in the search box
  • Enter 'F3' in the Binding textbox.
  • If you are editing for C++, Java any language, you need to have a specific F3 binding for that language!
  • Example for Java source code select 'Editing Java Source' in the 'When' dropbox.
  • 前往:Window/preferences/General/Keys 打开按键映射视图。
  • 在搜索框中输入“打开声明”
  • 在绑定文本框中输入“F3”。
  • 如果您正在为 C++、Java 任何语言进行编辑,则需要为该语言设置特定的 F3 绑定!
  • Java 源代码示例 在“何时”下拉框中选择“编辑 Java 源”。

Apply and press Ok

应用并按确定

回答by Tousif Jamadar

Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.

右键单击项目 -> 属性 -> 项目构面 -> 单击配置链接 -> 单击应用按钮 -> 单击确定按钮。

The above steps should set your project as a Java project.

上述步骤应该将您的项目设置为 Java 项目。

回答by Arokiadoss Asirvatham

I had a similar problem today - Unable to open Declarations in Java Editor using F3or CTRL+Left Click.

我今天遇到了类似的问题 - 无法在 Java 编辑器中使用F3或打开声明CTRL+Left Click

Solution :

解决方案 :

STEP1:Selected any java file in Eclipse Explorer.

STEP1:在 Eclipse Explorer 中选择任何 java 文件。

STEP2:Clicked the - sign at the top of the Eclipse explorer. This compressed view of all modules in Eclipse.

STEP2:单击 Eclipse 资源管理器顶部的 - 符号。这是 Eclipse 中所有模块的压缩视图。

STEP3:Right click on the empty space on the Eclipse Java Explorer and chose Refresh Option (F5) .

STEP3:右键单击 Eclipse Java Explorer 上的空白区域并选择 Refresh Option ( F5) 。

STPE4 :Happily the navigate options like F3, F2, CTRL + Right Clickall started working.

STPE4:令人高兴的导航选项,如F3F2CTRL + Right Click一切都开始工作。