java NetBeans 在导航器视图中是否有任何用于打开目录的“全部折叠”快捷方式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4000738/
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
Does NetBeans have any "collapse all" shortcut for open directories in the navigator view?
提问by Steve Perkins
NetBeans has a helpful (to meanyway!) feature under the "Views" menu, called "Synchronize Editor with Views". As the name suggests, toggling this on will cause the navigator view to jump straight to a file when it's opened in the editor.
NetBeans在“视图”菜单下有一个有用的(无论如何对我来说!)功能,称为“将编辑器与视图同步”。顾名思义,打开此选项将导致导航器视图在编辑器中打开时直接跳转到文件。
I generally prefer this to the normal "Ctrl+Shift+1" shortcut for manually jumping to a file. However, the downside is that after editing several files, your navigator tree is a mess of multiple open directories.
与手动跳转到文件的普通“Ctrl+Shift+1”快捷方式相比,我通常更喜欢这个。但是,缺点是在编辑多个文件后,您的导航树是多个打开的目录的混乱。
Eclipse has similar functionality, but it alsohas a "collapse all" button at the top of its navigator view... restoring things with a single click having to scroll around. Does NetBeans have any similar mechanism for collapsing open directories? Maybe a poorly-documented keyboard shortcut buried in there or something?
Eclipse 具有类似的功能,但它的导航器视图顶部也有一个“全部折叠”按钮……只需单击一下即可恢复内容,必须滚动浏览。NetBeans 是否有任何类似的折叠打开目录的机制?也许是隐藏在那里的记录不完整的键盘快捷键或其他什么?
采纳答案by Steve Perkins
Unfortunately, after further digging on the NetBeans discussion forums and mailing lists, it seems that this functionality simply doesn't exist. That's a shame... hopefully they'll add it in the future.
不幸的是,在深入研究 NetBeans 论坛和邮件列表之后,似乎根本不存在此功能。真可惜……希望他们将来会添加它。
回答by Hardik
Taken from http://ui.netbeans.org/docs/ui/code_folding/cf_uispec.html
取自http://ui.netbeans.org/docs/ui/code_folding/cf_uispec.html
Collapse Fold Ctrl+Minus
Expand Fold Ctrl+Plus
Collapse All Folds Ctrl+Shift+Minus
Expand All Folds Ctrl+Shift+Plus
回答by user2239352
A dirty solution is to close the project and reopen it. It will start collapsed.
一个肮脏的解决方案是关闭项目并重新打开它。它会开始崩溃。
回答by dropson
Close the navigator (press the x). Then go to Window->Navigating->Navigator or press Ctrl+7. It should open the navigator with all collapsed.
关闭导航器(按 x)。然后转到 Window->Navigating->Navigator 或按 Ctrl+7。它应该打开所有折叠的导航器。
http://variousfixes.wordpress.com/2011/09/03/how-to-collapse-all-elements-in-netbeans-navigator/
http://variousfixes.wordpress.com/2011/09/03/how-to-collapse-all-elements-in-netbeans-navigator/