dzsessona / QuickOpener-NetBeans

Sometimes while programming in NetBeans you want to explore a particular file that you are editing on the file system browser, or maybe launch a command in a terminal to do something with it.
52 stars 41 forks source link

[Windows] Open in FileManager should select the file/dir #51

Closed markiewb closed 8 years ago

markiewb commented 10 years ago

ACTUAL: file manager is opened, file/dir from NetBeans is NOT selected in the explorer EXPECTED: file manager is opened, file/dir from NetBeans is selected in the explorer See http://support.microsoft.com/kb/314853/en

IMHO this should be fixed in https://github.com/dzsessona/oscommands/blob/master/OSCommands/src/com/sessonad/oscommands/commands/Commands.java

markiewb commented 9 years ago

Once https://github.com/dzsessona/oscommands/pull/3 is merged, I can provide a patch and include the new jar file

diff --git a/QuickOpener/src/me/dsnet/quickopener/actions/FileSystem.java b/QuickOpener/src/me/dsnet/quickopener/actions/FileSystem.java
index 5faf775..7e34d7d 100644
--- a/QuickOpener/src/me/dsnet/quickopener/actions/FileSystem.java
+++ b/QuickOpener/src/me/dsnet/quickopener/actions/FileSystem.java
@@ -27,14 +27,14 @@

     @Override
     public void actionPerformed(ActionEvent e) {
-        File toOpen = PathFinder.getActiveFile(dataObj,true);
-        if (toOpen == null) {
+        File file = PathFinder.getActiveFile(dataObj,false);
+        if (file == null) {
             NotifyDescriptor d = new NotifyDescriptor.Message(QuickMessages.NO_FILE_IN_SELECTION,NotifyDescriptor.WARNING_MESSAGE);
             DialogDisplayer.getDefault().notify(d);
             return;
         }
         try {
-            Commands.getPlatform().browseInFileSystem(toOpen);
+            Commands.getPlatform().browseInFileSystemToFileOrDir(file);
         } catch (Exception ex) {}//ex.printStackTrace();}
     }
 }
markiewb commented 8 years ago

After including #60, I can apply my patch and this issue will be solved.