Coverage Report
livenotificationrun
measured on November 5, 2007 4:04:16 PM CET
up to the title page
org . codecover . simplejavaapp . controller . AppController . onCloseWindow
Statement Coverage Branch Coverage Loop Coverage Strict Condition Coverage
private boolean onCloseWindow(String fileId) 5 / 5 100 %
5 / 8 62 %
0 / 0 ---
0 / 2 0 %
AppController.java
65       private boolean onCloseWindow(String fileId) {
66           if (model.isFileModified(fileId)) {
67               int result = view.showConfirmationDialog(
68                       "The file has modifications. Save before proceeding?",
69                       fileId);
70  
71               switch (result) {
72                   case JOptionPane.YES_OPTION:
73                       if (!onSave(fileId)) {
74                           /* Saving was aborted or failed, so we don't proceed */
75                           return false;
76                       }
77                       break;
78                   case JOptionPane.NO_OPTION:
79                       break;
80                   case JOptionPane.CANCEL_OPTION:
81                       /* Saving was aborted or failed, so we don't proceed */
82                       return false;
83               }
84           }
85  
86           view.closeWindow(fileId);
87           model.closeFile(fileId, true);
88           return true;
89       }
created on November 17, 2007 7:07:00 PM CET with CodeCover