corner imagecorner image
IDEPlatformPluginsDocs & SupportCommunityPartners

zapp-openfolder - plugin detail

This plugin can help you to open folder from local system when you select a folder in netbeans's projects window or files window.All you do is to right click the folder and in the popup menu click on the menu item "Open Folder"

n/a
Plugin owner: ezman
Website:
Added: 2007-12-25
Last updated: 2007-04-01
NetBeans Versions:
License: free
Category:
Size: 0.00 MB
Downloaded: 292 times
Rating:
 0, by 0 users


Download plugin

Verifications for NetBeans versions

Plugin is not subject to any verification

Introduction

This plugin can help you to open folder from local system when you select a folder in netbeans's projects window or files window.All you do is right click the folder and in the popup menu click on the menu item "Open Folder" I use to use a plugin named "explore from here" to do the same work,but I found I could not install it into netbeans 6.0,so I wrote a new plugin named "open folder" for me to realize the same function but may be more simple. What I had done is very simple,just use netbeans ide to create a plugin project and write only one sentence: "Desktop.getDesktop().browse(c.getPrimaryFile().getURL().toURI());" . Since class Desktop is added after java 1.6,we can only use the plugin on jdk1.6 or later you can see the mainly code here: " package zapp.app.netbeans.module.openfolder; import java.awt.Desktop; import java.io.IOException; import java.net.URISyntaxException; import org.openide.filesystems.FileStateInvalidException; import org.openide.loaders.DataObject; import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CookieAction; public final class OpenFolderAction extends CookieAction { protected void performAction(Node[] activatedNodes) { DataObject c = (DataObject) activatedNodes[0].getCookie(DataObject.class); try { // TODO use c Desktop.getDesktop().browse(c.getPrimaryFile().getURL().toURI()); } catch (FileStateInvalidException ex) { ex.printStackTrace(); } catch (URISyntaxException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } } protected int mode() { return CookieAction.MODE_EXACTLY_ONE; } public String getName() { return NbBundle.getMessage(OpenFolderAction.class, "CTL_OpenFolderAction"); } protected Class[] cookieClasses() { return new Class[] { DataObject.class }; } protected void initialize() { super.initialize(); // see org.openide.util.actions.SystemAction.iconResource() javadoc for more details putValue("noIconInMenu", Boolean.TRUE); } public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } protected boolean asynchronous() { return true; } } " Today is Christmas,Merry Christmas!

What's new in this version

[ You have to be logged in to be able to comment. ]

User Comments

  

Obsolete - use 'Pathtools' instead

This plugin is obsolete, because http://plugins.netbeans.org/plugin/676/path-tools does the same and more. And it is even compatible up to 7.x.
Posted by markiewb on May 03, 2012
  

useful feature

I made a quick and dirty version of this a while ago, and I use this feature all the time. If you want my code that works on earlier java that supports windows and linux (gnome), I can provide it...
Posted by jbfaden on Dec 27, 2007