简体   繁体   English

如何使用键盘快捷键在Eclipse Project Explorer视图中查找当前文件?

[英]How to locate current file in Eclipse Project Explorer view using keyboard shortcut?

As a user of ReSharper in Visual Studio, I find the Locate in Solution Explorer shortcut, ( Shift + Alt + L ), immensely useful. 作为Visual Studio中ReSharper的用户,我在解决方案资源管理器快捷方式( Shift + Alt + L )中找到了Locate ,非常有用。 Is there an equivalent in Eclipse to locate the current file in the Project Explorer? Eclipse中是否有等价物可以在Project Explorer中找到当前文件?

A Google search and a quick root around in the Keys preferences window suggested there wasn't, but perhaps I just couldn't find it. 谷歌搜索和密钥首选项窗口中的快速根据建议没有,但也许我找不到它。

The default setting is Alt + Shift + W . 默认设置为Alt + Shift + W. But you can set any key combination you like to the command "Show In (Project Explorer)" from the Preferences | 但您可以从“首选项”|中的“显示输入(项目浏览器)”命令中设置您喜欢的任何组合键 General | 一般| Keys dialog. 键对话框。

I am not sure about a shortcut key, but there is a small button in the "Package Explorer" toolbar with two arrows. 我不确定快捷键,但“Package Explorer”工具栏中有一个带有两个箭头的小按钮。 If you press that toggle button then the Package Explorer will select the currently editing file. 如果按下切换按钮,则Package Explorer将选择当前编辑的文件。

Similar for the Project Explorer view. 与Project Explorer视图类似。

If you press the buttons ctrl - shift - r you get access to open a resource in a project. 如果按ctrl - shift - r按钮,则可以访问项目中的资源。 If you then have the two double arrows clicked in the project explorer, you will go straight to that file. 如果您在项目资源管理器中单击了两个双箭头,则会直接转到该文件。

answer is here Eclipse : Link with editor keyboard shortcut? 回答是这里Eclipse:链接编辑器键盘快捷键?

There is not by default, but you can define this yourself. 默认情况下没有,但您可以自己定义。 Go into Preferences -> General -> Keys, and then type "link" into the search box. 进入首选项 - >常规 - >键,然后在搜索框中键入“链接”。 You want the "Toggle Link with Editor" command. 您需要“使用编辑器切换链接”命令。 You can then define the key binding by filling in the "Binding" box below. 然后,您可以通过填写下面的“绑定”框来定义键绑定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM