()
| 42 | } |
| 43 | |
| 44 | private void initResult() { |
| 45 | this.gui.setUponShowFile(() -> { |
| 46 | String outputName = this.gui.getOutputFile(); |
| 47 | try { |
| 48 | if (Desktop.getDesktop() |
| 49 | .isSupported(Desktop.Action.OPEN)) { |
| 50 | Desktop.getDesktop() |
| 51 | .open(new File(outputName)); |
| 52 | } |
| 53 | } catch (IOException e) { |
| 54 | Loggger.log(e.getMessage()); |
| 55 | } |
| 56 | }); |
| 57 | |
| 58 | this.gui.setOpenHammerEditor(() -> { |
| 59 | try { |
| 60 | String outputName = Steam.getHammerPath(this.gui.getSourceGame()); |
| 61 | Loggger.log("executing: " + outputName); |
| 62 | String[] cmd = { outputName }; |
| 63 | Runtime.getRuntime() |
| 64 | .exec(cmd); |
| 65 | } catch (IOException e) { |
| 66 | // TODO Auto-generated catch block |
| 67 | e.printStackTrace(); |
| 68 | } |
| 69 | }); |
| 70 | } |
| 71 | |
| 72 | private void initDetails() { |
| 73 | String[] convertOptionNames = Periphery.CONFIG.getConvertOptionNames(); |
no test coverage detected