开发者

Open folder in Netbeans?

Is the开发者_JAVA百科re a way to open a folder that contains javascript/ruby files in Netbeans without creating a new project?


There is one generic way to show any folder in the file system and its contents in NetBeans. Please follow these steps.

  1. In NetBeans IDE, invoke Windows Menu and Favorites option. This will open a Favorites panel just besides the Project, Files, Services panels
  2. Right click in empty area of the Favorites panel and choose "Add to Favorites" option which will show you a dialog box. Now choose any folder from the file system and press Add button.
  3. Now you have the folder available in Favorites panel with all its contents as nodes. The files can be opened by double clicking in their respective editors if they are supported by NetBeans.
  4. When you right click on any file node NetBeans IDE will show three options Open (open in NetBeans default editor for that file type), OpenAs.. (choose from a list of editors for different file types) and Open in System (open in OS specific editor registered in OS)

UPDATE (05 Nov 2011):
NetBeans IDE latest version 7.1 Beta and onwards also shows one popular project named HTML Project Support. This is the exact project support needed for the HTML static pages and JavaScript static pages. The plugin description shown in the Plugin center is as follows:

Support for directories containing HTML files as first-class projects. Automatically opens any dir named 'www' or 'public-html' as a project; other directories can be opened via New > Project. Stores nothing inside your web directory that might clutter your web server. Provides a flattened logical view of all HTML files in all subdirs of the project, listed by HTML title rather than file title, and support for 'building' (zipping) and 'running' (viewing). Generally should be handy for doing documentation and articles.

This plugin can be installed from the Plugins dialog box and selecting the module names "HTML Project support"


(Short answer: just use 'Favourites')

To open a local file/folder (as a file-explorer) in Netbeans, in the top menu-bar goto: Window -> Favourites (or press Ctrl+3), this will open 'Favourites' pane, here you can open files or folders (in Linux, by default you will see your 'home' directory).

HTH Aditya


If it is a rails project, and have the ruby and rails plugin installed, it will automatically detect the rails folder as a project.

Just select File -> Open Project...

If it is a folder containing just ruby and javascript files, I suspect you might need to create a new project, it used to be really difficult to even open a single file in Netbeans without starting a project.

You can drag and drop files from the OS into the editor, but you won't get the project overview down the left hand side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜