MCPcopy Create free account
hub / github.com/Garten/sourcecraft / initResult

Method initResult

src/main/GuiLogic.java:44–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

runMethod · 0.95

Calls 7

logMethod · 0.95
getHammerPathMethod · 0.95
setUponShowFileMethod · 0.45
getOutputFileMethod · 0.45
openMethod · 0.45
setOpenHammerEditorMethod · 0.45
getSourceGameMethod · 0.45

Tested by

no test coverage detected