summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/gui/GuiController.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/GuiController.java')
-rw-r--r--src/main/java/cuchaz/enigma/gui/GuiController.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/GuiController.java b/src/main/java/cuchaz/enigma/gui/GuiController.java
index c301594..fe7d097 100644
--- a/src/main/java/cuchaz/enigma/gui/GuiController.java
+++ b/src/main/java/cuchaz/enigma/gui/GuiController.java
@@ -17,6 +17,7 @@ import com.strobel.decompiler.languages.java.ast.CompilationUnit;
17 17
18import java.io.File; 18import java.io.File;
19import java.io.FileReader; 19import java.io.FileReader;
20import java.io.FileWriter;
20import java.io.IOException; 21import java.io.IOException;
21import java.util.Collection; 22import java.util.Collection;
22import java.util.Deque; 23import java.util.Deque;
@@ -87,6 +88,17 @@ public class GuiController {
87 this.isDirty = false; 88 this.isDirty = false;
88 } 89 }
89 90
91 public void saveOldMappings(File file) throws IOException {
92 FileWriter out = new FileWriter(file);
93 new MappingsOldWriter().write(out, this.deobfuscator.getMappings());
94 this.isDirty = false;
95 }
96
97 public void saveSRGMappings(File file) throws IOException {
98 new MappingsSRGWriter().write(file, this.deobfuscator);
99 this.isDirty = false;
100 }
101
90 public void closeMappings() { 102 public void closeMappings() {
91 this.deobfuscator.setMappings(null); 103 this.deobfuscator.setMappings(null);
92 this.gui.setMappingsFile(null); 104 this.gui.setMappingsFile(null);