Java Eclipse 查找函数名的快捷方式

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

Eclipse shortcut to find function name

javaeclipse

提问by frewper

I have certain methods/functions in a class which are fairly very large, 3-4k lines. (Poor design, dont ask) which makes navigation very difficult.

我在一个类中有某些方法/函数,它们非常大,3-4k 行。(糟糕的设计,不要问)这使得导航非常困难。

Is there a certain shortcut in eclipse, such that, if i am at a certain line of code, using the shortcut will take me directly to the beginning of the function or atleast give me the name of the function.

eclipse 中是否有特定的快捷方式,这样,如果我在某行代码,使用快捷方式将直接带我到函数的开头,或者至少给我函数的名称。

采纳答案by rocketboy

You can use Outlineview. If you have your cursor within a method, the appropriate method will be selected in the view and double-clickingon the selected method will take you to the top of the method.

您可以使用大纲视图。如果您的光标位于某个方法内,则会在视图中选择适当的方法,双击所选方法将带您到该方法的顶部。

Screenshot coming up.

截图来了。

Edit:enter image description here

编辑:在此处输入图片说明

回答by Suresh Atta

You can use CTRL+Owhich gives a list of methods in the popup.

您可以使用CTRL+O它在弹出窗口中提供方法列表。

That gives Outline of current source

这给出了当前来源的轮廓

It lists all the methods in the File.

它列出了所有的方法 File.

All shortcuts

所有快捷键

回答by Nandkumar Tekale

I would suggest you to use Bread crumbavailable in Eclipse. You can enable it using Alt+Shift+B.

我建议您Bread crumb在 Eclipse 中使用available。您可以通过启用Alt+ Shift+ B

image

图片

You can have quick access to packages, classes and methods.

您可以快速访问包、类和方法。

Check here http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-java-editor-breadcrumb.htm

在这里检查http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-java-editor-breadcrumb.htm

回答by Parth

CTRL+ Oshows you all member variable or method available in class

CTRL+O显示类中可用的所有成员变量或方法

回答by 147.3k

Ctrl+o might be what you are looking for.

Ctrl+o 可能正是您要找的。

It will list out all the methods under the class file.

它将列出类文件下的所有方法。

You just take a look at all other shorcut keys available here http://www.shortcutworld.com/en/win/Eclipse.html.

您只需查看http://www.shortcutworld.com/en/win/Eclipse.html 中提供的所有其他快捷键。

Hope it helps.

希望能帮助到你。

回答by gregory561

Ctrl + Shift + (Arrow Up) takes you to the beginning of a function. (At least in my configuration).

Ctrl + Shift +(向上箭头)将您带到函数的开头。(至少在我的配置中)。