+/*
+ * Instantlauncher. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
+ */
+
package eu.svjatoslav.instantlauncher;
-import eu.svjatoslav.commons.gui.dialog.ExceptionDialog;
import eu.svjatoslav.instantlauncher.configuration.ConfigurationManager;
import eu.svjatoslav.instantlauncher.configuration.FileAssociation;
}
public void openDirectory(File chosenFile) {
- executeCommand(configurationManager.getConfiguration().directoryOpenCommand, chosenFile.getAbsolutePath());
+ runOpeningApplication(configurationManager.getConfiguration().directoryOpenCommand, chosenFile);
}
- public void executeCommand(String... c) {
- try {
- Runtime.getRuntime().exec(c);
- exitProgram();
-
- } catch (final IOException e) {
- new ExceptionDialog(e);
- }
+ public void openDirectoryInTerminal(File chosenFile) {
+ runOpeningApplication(configurationManager.getConfiguration().directoryTerminalOpenCommand, chosenFile);
}
+
}