IntelliJ IDEA 相当于 Eclipse“Link with Editor”

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

IntelliJ IDEA equivalent of Eclipse "Link with Editor"

eclipseeditorintellij-idea

提问by Kevin Herron

In Eclipse you can check the "Link with Editor" option and whatever source file you are viewing in the current tab will be highlighted and have its package expanded in the Package Explorer view.

在 Eclipse 中,您可以选中“Link with Editor”选项,您在当前选项卡中查看的任何源文件都将突出显示,并在 Package Explorer 视图中展开其包。

Is there something equivalent to this in IntelliJ IDEA 8.1?

IntelliJ IDEA 8.1 中是否有与此等效的内容?

采纳答案by VonC

Update (2020, eleven years later): see "Source code navigation / Locate a file in the Project tool window"

更新(2020 年,十一年后):参见“源代码导航/在项目工具窗口中定位文件

In the Projecttool window, right-click the Projecttoolbar and, from the context menu, select Always Select Opened File.

After that IntelliJ IDEA will track the file that is currently opened in the active editor tab and locate it in the Projecttool window automatically.

Project工具窗口中,右键单击Project工具栏,然后从上下文菜单中选择Always Select Opened File

之后,IntelliJ IDEA 将跟踪当前在活动编辑器选项卡中打开的文件,并Project自动在工具窗口中找到它。

https://www.jetbrains.com/help/img/idea/2019.3/project_view_context_menu.png

https://www.jetbrains.com/help/img/idea/2019.3/project_view_context_menu.png



Original answer (2009)

原始答案 (2009)

That would be autoscrollFromSource.png: Autoscroll from Source.

那将是autoscrollFromSource.pngAutoscroll from Source

Navigate from a file in the Editor that gets the focus, to the corresponding node in the Project Tool Window.

从获得焦点的编辑器中的文件导航到项目工具窗口中的相应节点。

alt text

替代文字

Fried Hoebencommentsthat

Fried Hoeben评论

you get there from the config of the project tool window.
It is not present in the general IDE settings (at least in version 12)

您可以从项目工具窗口的配置中到达那里。
它不存在于一般 IDE 设置中(至少在版本 12 中)

回答by Vielinko

At IntelliJ IDEA 12 (13, 14 and 15 from comments), it is located at the gear icon into the "Project" Tool Window, called as our mate said, Autoscroll from source

在 IntelliJ IDEA 12(来自评论的 13、14 和 15),它位于“项目”工具窗口中的齿轮图标处,正如我们的伙伴所说,Autoscroll from source

check the image

检查图像

enter image description here

在此处输入图片说明

I hope this can helps someone else :)

我希望这可以帮助别人:)

回答by Tamas

In version 2016.3, it's a little icon on the Project Tool Window called Scroll from Source. It's the first icon on the right see screen shot

在 2016.3 版本中,它是项目工具窗口上的一个小图标,名为 Scroll from Source。这是右侧的第一个图标,请参阅屏幕截图

回答by RV.

Right clickon the Project Title bar (Project view). Then select the Option "Autoscroll from Resource".

右键单击项目名称栏(项目视图)。然后选择选项“从资源自动滚动”

回答by Thomas Mathew

In Intellij 2019.3 community editor, it is to right-click on the Project view and check the item "Always select opened file.

在Intellij 2019.3社区编辑器中,就是在Project视图上右击,勾选“始终选择打开的文件。