Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Pontesegger2014-12-05 20:58:11 +0000
committerChristian Pontesegger2014-12-05 20:58:11 +0000
commit0e902b2ec3d2f175409c97afa17c226b21afd795 (patch)
tree7b2becc320521b51946b1275debdb72c3ba127e4
parentdba12aa5fcfc32b47874d50875cee964383f67a3 (diff)
downloadorg.eclipse.ease.scripts-0e902b2ec3d2f175409c97afa17c226b21afd795.tar.gz
org.eclipse.ease.scripts-0e902b2ec3d2f175409c97afa17c226b21afd795.tar.xz
org.eclipse.ease.scripts-0e902b2ec3d2f175409c97afa17c226b21afd795.zip
disabled nashorn enginerelease_0.1.0
instanceof methods do not work on nashorn 8.0.25, disabled nashorn engine in general added adapter adapt selection to IResource Change-Id: Ia48866b73aace2062d51a11d917c2e598e3b64f5
-rw-r--r--JavaScript Snippets/Explore from here.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/JavaScript Snippets/Explore from here.js b/JavaScript Snippets/Explore from here.js
index c745ded..dfc7559 100644
--- a/JavaScript Snippets/Explore from here.js
+++ b/JavaScript Snippets/Explore from here.js
@@ -3,13 +3,14 @@
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors : Christian Pontesegger - initial API and implementation
* name : Explore from here
- * image : platform:/plugin/org.eclipse.ease.ui/icons/eobj16/folder.png
- * toolbar : Project Explorer
- * popup : enableFor(org.eclipse.core.resources.IResource)
+ * image : platform:/plugin/org.eclipse.ease.ui/icons/eobj16/folder.png
+ * toolbar : Project Explorer
+ * popup : enableFor(org.eclipse.core.resources.IResource)
* script-type : JavaScript
+ * script-engine : !org.eclipse.ease.javascript.nashorn
* description : Start a file browser using current selection.
******************************************************************************/
@@ -20,9 +21,12 @@ var selection = getSelection();
if (selection instanceof org.eclipse.jface.viewers.IStructuredSelection)
selection = selection.getFirstElement();
+if (!(selection instanceof org.eclipse.core.resources.IResource))
+ selection = adapt(selection, org.eclipse.core.resources.IResource)
+
if (selection instanceof org.eclipse.core.resources.IFile)
selection = selection.getParent();
if (selection instanceof org.eclipse.core.resources.IContainer)
- // runProcess("/usr/bin/krusader", ["--left", getSystemProperty("user.home"), "--right", selection.getRawLocation()]);
- runProcess("explorer.exe", [ selection.getRawLocation() ]);
+ runProcess("/usr/bin/krusader", [ "--left", getSystemProperty("user.home"), "--right", selection.getRawLocation() ]);
+ // runProcess("explorer.exe", [ selection.getRawLocation() ]); \ No newline at end of file

Back to the top