Author: rob.stryker(a)jboss.com
Date: 2010-10-06 04:36:54 -0400 (Wed, 06 Oct 2010)
New Revision: 25508
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
Log:
JBIDE-7266 - for nautilus exploring a file should simply open its parent folder
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-10-06
07:42:39 UTC (rev 25507)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-10-06
08:36:54 UTC (rev 25508)
@@ -49,6 +49,9 @@
}
public static String getExploreFileCommand() {
+ exploreFileCommand = null;
+ exploreFolderCommandArray = null;
+ exploreFolderCommand = null;
if (exploreFileCommand == null) {
setExploreCommands();
}
@@ -120,7 +123,8 @@
try {
if (Platform.OS_LINUX.equals(Platform.getOS()) ||
Platform.OS_MACOSX.equals(Platform.getOS())) {
int len = exploreFolderCommandArray.length;
- exploreFolderCommandArray[len-1] = name;
+ String name2 = file.isFile() ? new Path(name).removeLastSegments(1).toString() :
name;
+ exploreFolderCommandArray[len-1] = name2;
Runtime.getRuntime().exec(exploreFolderCommandArray);
} else if (Platform.getOS().equals(Platform.OS_WIN32)) {
command = command.replace(ExploreUtils.PATH, name);
Show replies by date