java Netbeans - 如何在此 IDE 中找到文件的路径?

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

Netbeans - how do I find the path to a file within this IDE?

javafilepluginsnetbeanspath

提问by Dave566

I want to be able to right click an item within the 'Projects' or 'Files' window, and either have an 'open in file system' option, or 'copy absolute path to this file'.

我希望能够在“项目”或“文件”窗口中右键单击一个项目,然后选择“在文件系统中打开”选项,或者“将绝对路径复制到该文件”。

Is there a plugin or a hidden option within Netbeans that will allow me to achieve this?

Netbeans 中是否有插件或隐藏选项可以让我实现这一目标?

I just need an easier way to get to the folder within Windows Explorer without having to spend the time navigating there.

我只需要一种更简单的方法来访问 Windows 资源管理器中的文件夹,而不必花时间在那里导航。

I'm open to making a small plugin myself if it'll make it happen?

如果能实现的话,我愿意自己制作一个小插件吗?

采纳答案by wenqiang

There is a community contributed plugin on NetBeans bug-tracking systemthat can implement the feature. I have verified that the plugin works well with NetBeans 6.9.1. Once installed, you could copy the path of a file (or files under a folder node) via Edit/Copy Path menu.

NetBeans 错误跟踪系统上有一个社区贡献的插件可以实现该功能。我已验证该插件与 NetBeans 6.9.1 配合良好。安装后,您可以通过“编辑/复制路径”菜单复制文件(或文件夹节点下的文件)的路径。

Plugin "Path Tools" @ plugins.netbeans.org

插件“路径工具”@ plugins.netbeans.org

回答by Sival Dot

With Netbeans 8 you can use:

使用 Netbeans 8,您可以使用:

Alt+Shift+L

It's defined under Options->Keymap as Copy File Path(s)

它在 Options->Keymap 下定义为 Copy File Path(s)

回答by sgokhales

Somewhat related : netbeans - how to view file full path in window title (or somewhere else)?
You can use either of following :

有点相关:netbeans - 如何在窗口标题(或其他地方)中查看文件的完整路径?
您可以使用以下任一项:

  1. Use Alt+Shift+O to open files by name (which shows the path and the project)
  2. Hit Ctrl+Shift+1 while in the editor to highlight the file in the Projects View
  1. 使用 Alt+Shift+O 按名称打开文件(显示路径和项目)
  2. 在编辑器中按 Ctrl+Shift+1 以突出显示项目视图中的文件

回答by bitterpurple

I use this plugin which lets you copy the full path of a file to the clipboard - https://github.com/kinkadzs/QuickOpener-NetBeans

我使用这个插件可以让你将文件的完整路径复制到剪贴板 - https://github.com/kinkadzs/QuickOpener-NetBeans

回答by krtek

The information you search can be accessed trough the file properties.

可以通过文件属性访问您搜索的信息。

In the Projects window, right click on a file, select 'Properties', the file path is under the 'All Files' line.

在“项目”窗口中,右键单击一个文件,选择“属性”,文件路径在“所有文件”行下。

You can also press Alt-Shift-O while the file is selected in the Projects view or the file you're editing.

您也可以在“项目”视图或您正在编辑的文件中选择文件时按 Alt-Shift-O。