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
IntelliJ IDEA equivalent of Eclipse "Link with Editor"
提问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
Project
tool window, right-click theProject
toolbar and, from the context menu, selectAlways 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
Project
tool window automatically.
在
Project
工具窗口中,右键单击Project
工具栏,然后从上下文菜单中选择Always Select Opened File
。之后,IntelliJ IDEA 将跟踪当前在活动编辑器选项卡中打开的文件,并
Project
自动在工具窗口中找到它。
Original answer (2009)
原始答案 (2009)
That would be : Autoscroll from Source.
那将是:Autoscroll from Source。
Navigate from a file in the Editor that gets the focus, to the corresponding node in the Project Tool Window.
从获得焦点的编辑器中的文件导航到项目工具窗口中的相应节点。
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
检查图像
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视图上右击,勾选“始终选择打开的文件。