Java CTRL+单击以打开方法声明在 Eclipse 3.5 (Galileo) 上不起作用

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

CTRL+click to open method declaration doesn't work on Eclipse 3.5 (Galileo)

javaeclipsegalileo

提问by talg

In a J2EE project Ctrl+click on methods (usually only local methods, ones that belong to the same class) doesn't jump to that method declaration. The eclipse project was created using Gradle so that might be an issue, also when Eclipse starts the log has the following exception:

在 J2EE 项目中,Ctrl+单击方法(通常只有本地方法,属于同一类的方法)不会跳转到该方法声明。eclipse 项目是使用 Gradle 创建的,所以这可能是一个问题,而且当 Eclipse 启动时,日志有以下异常:

A handler conflict occurred. This may disable some commands. Conflict for 'org.eclipse.wst.jsdt.ui.edit.text.java.open.editor':HandlerActivation(commandId=org.eclipse.wst.jsdt.ui.edit.text.java.open.editor, handler=ActionHandler(org.eclipse.wst.jsdt.ui.actions.OpenAction@c5f6db), expression=AndExpression(AndExpression(org.eclipse.ui.SubActionBars$1@fdd15b,ActivePartExpression(org.eclipse.ui.navigator.resources.ProjectExplorer@38ba04)),WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1f528ab)),sourcePriority=1064961) HandlerActivation(commandId=org.eclipse.wst.jsdt.ui.edit.text.java.open.editor, handler=ActionHandler(org.eclipse.wst.jsdt.ui.actions.OpenAction@c5f6db), expression=AndExpression(AndExpression(org.eclipse.ui.SubActionBars$1@fdd15b,ActivePartExpression(org.eclipse.ui.navigator.resources.ProjectExplorer@38ba04)),WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1f528ab)),sourcePriority=1064961)

发生处理程序冲突。这可能会禁用某些命令。'org.eclipse.wst.jsdt.ui.edit.text.java.open.editor'的冲突:HandlerActivation(commandId=org.eclipse.wst.jsdt.ui.edit.text.java.open.editor, handler= ActionHandler(org.eclipse.wst.jsdt.ui.actions.OpenAction@c5f6db), expression=AndExpression(AndExpression(org.eclipse.ui.SubActionBars$1@fdd15b,ActivePartExpression(org.eclipse.ui.navigator.resources.ProjectExplorer@ 38ba04)),WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@1f528ab)),sourcePriority=1064961) HandlerActivation(commandId=org.eclipse.wst.jsdt.ui.edit.text.java.open.editor, handler= ActionHandler(org.eclipse.wst.jsdt.ui.actions.OpenAction@c5f6db), expression=AndExpression(AndExpression(org.eclipse.ui.SubActionBars$1@fdd15b,ActivePartExpression(org.eclipse.ui.navigator.resources.

I am running eclipse on Fedora 12 distro

我在 Fedora 12 发行版上运行 eclipse

回答by kalkin

I could always just press F3.

我总是可以按F3。

回答by icemedia

it seems you didn't put the source code into your classpath. just right click you source code package and select "build path -> use as source folder"

看来您没有将源代码放入类路径中。只需右键单击您的源代码包并选择“构建路径->用作源文件夹”

回答by Manish

If your code contains error it will not let you to do ctrl+click to see the defination so... try to remove the errors first

如果您的代码包含错误,它不会让您按 ctrl+click 来查看定义,所以...首先尝试删除错误