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

Method closeFile

src/main/java/MainWindow.java:311–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309 }
310
311 private boolean closeFile()
312 {
313 if (Main.saveDatabase == null) {
314 return true;
315 }
316
317 if (Main.dataModified) {
318 int option = JOptionPane.showConfirmDialog(this, "The current save has been modified. Do you want to save the changes?", "Save Modified", 1);
319
320 if (option == 2) {
321 return false;
322 }
323 if ((option == 0) &&
324 (!saveFile())) {
325 return false;
326 }
327
328 }
329
330 Main.database = null;
331 Main.modDatabase = null;
332 Main.saveDatabase = null;
333 Main.dataModified = false;
334 this.tabbedPane.setVisible(false);
335 return true;
336 }
337
338 private void unpackSave()
339 {

Callers 4

actionPerformedMethod · 0.95
openFileMethod · 0.95
packSaveMethod · 0.95
exitProgramMethod · 0.95

Calls 1

saveFileMethod · 0.95

Tested by

no test coverage detected