如何将打开的文件与 NetBeans 中的项目树链接
我觉得问这个问题很愚蠢,但我自己找不到解决方案。
当我在编辑器中打开多个文件并在它们之间切换时,我在项目或文件树中查找当前打开的文件时遇到问题。
我之前使用过 Eclipse,每次更改文件选项卡时,项目树都会将焦点设置为同一文件。 有没有办法在 NetBeans 中执行类似的操作?
I feel dumb asking this question, but I can't find solution to this myself.
When I open several files in editor and switch between them, I have problem finding currently opened file in project or files tree.
I used Eclipse before and every time I changed a tab with file, the project tree set focus for the same file. Is there a way to do something like this in NetBeans?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
只是想添加 ax 所说的:
Windows 中的键盘快捷键是:
Ctrl+Shift+1
Ctrl+Shift+2
键盘快捷键在 OS X 中是:
CMD+Shift+1
CMD+Shift+2
Just thought of adding what ax said:
The keyboard shortcuts in Windows are:
Ctrl+Shift+1
Ctrl+Shift+2
The keyboard shortcuts in OS X are:
CMD+Shift+1
CMD+Shift+2
如 NetBeans“与编辑器链接”功能中所述,如果您希望链接永久或持久,使用 View | 将编辑器与视图同步。 (至少在 NetBeans >= 6.7.1 中。)
As described in NetBeans "link with editor" feature, if you want the link to be permanent or persistent, use View | Synchronize Editor with Views. (In NetBeans >= 6.7.1, at least.)
来自 http://forums.netbeans.org/topic3732.html :
您可以从我相信,导航菜单。 有条目用于
转到项目选项卡或文件选项卡中的文件。 我没有看到
选项允许您自动执行此操作,就像
Eclipse,但此菜单项允许您根据要求执行此操作。
[编辑]:也可以工作:在文件中> 鼠标右键> 选择> 项目 | 文件 | 课程 | 收藏夹
[编辑2]: http://forums.netbeans.org/topic8420.html :这个该功能在 NetBeans IDE 6.5 之前不可用。 该功能是新版本中添加的,可能在 NetBeans IDE 7.0M1 及更高版本中可用,您可以在“视图”菜单中找到它。
from http://forums.netbeans.org/topic3732.html :
You can do this from the navigate menu, I believe. There are entries for
going to the file in the project tab or the file tab. I didn't see an
option that allows you to do this automatically, like there is in
Eclipse, but this menu entry allows you to do it upon request.
[edit]: also working: in the file > right mouse button > select in > projects | files | classes | favourites
[edit 2]: http://forums.netbeans.org/topic8420.html : This feature is not available till NetBeans IDE 6.5. This feature is added in the new version and may be available in NetBeans IDE 7.0M1 and after and you can find it in the View Menu.
导航 -> 在文件或项目中选择
Navigate->Select in Files or Projects