MCPcopy Create free account
hub / github.com/boazy/TWEditorEnhanced / actionPerformed

Method actionPerformed

src/main/java/MainWindow.java:176–208  ·  view source on GitHub ↗
(ActionEvent ae)

Source from the content-addressed store, hash-verified

174 }
175
176 public void actionPerformed(ActionEvent ae)
177 {
178 try
179 {
180 String action = ae.getActionCommand();
181 if (action.equals("open")) {
182 openFile();
183 if (Main.saveDatabase != null)
184 setTitle("The Witcher Save Editor - " + Main.saveDatabase.getName());
185 else
186 setTitle(null);
187 } else if (action.equals("about")) {
188 aboutProgram();
189 } else if (action.equals("exit")) {
190 exitProgram();
191 } else if (Main.saveDatabase == null) {
192 JOptionPane.showMessageDialog(this, "No save file is open", "No Save", 0);
193 } else if (action.equals("save")) {
194 saveFile();
195 setTitle(null);
196 } else if (action.equals("close")) {
197 closeFile();
198 setTitle(null);
199 } else if (action.equals("unpack save")) {
200 unpackSave();
201 } else if (action.equals("repack save")) {
202 packSave();
203 setTitle(null);
204 }
205 } catch (Throwable exc) {
206 Main.logException("Exception while processing action event", exc);
207 }
208 }
209
210 private void openFile()
211 {

Callers

nothing calls this directly

Calls 11

openFileMethod · 0.95
setTitleMethod · 0.95
aboutProgramMethod · 0.95
exitProgramMethod · 0.95
saveFileMethod · 0.95
closeFileMethod · 0.95
unpackSaveMethod · 0.95
packSaveMethod · 0.95
logExceptionMethod · 0.95
equalsMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected