MCPcopy
hub / github.com/arduino/Arduino / handleClose

Method handleClose

app/src/processing/app/Base.java:952–973  ·  view source on GitHub ↗

Close a sketch as specified by its editor window. @param editor Editor object of the sketch to be closed. @return true if succeeded in closing, false if canceled.

(Editor editor)

Source from the content-addressed store, hash-verified

950 * @return true if succeeded in closing, false if canceled.
951 */
952 public boolean handleClose(Editor editor) {
953
954 if (editors.size() == 1) {
955 if (!handleQuit()) {
956 return false;
957 }
958 // Everything called after handleQuit will only affect OSX
959 editor.setVisible(false);
960 editors.remove(editor);
961 } else {
962 // More than one editor window open,
963 // proceed with closing the current window.
964 // Check if modified
965 if (!editor.checkModified()) {
966 return false;
967 }
968 editor.setVisible(false);
969 editor.dispose();
970 editors.remove(editor);
971 }
972 return true;
973 }
974
975
976 /**

Callers 4

windowClosingMethod · 0.80
buildFileMenuMethod · 0.80
handleDeleteCodeMethod · 0.80
openFilesMethod · 0.80

Calls 6

handleQuitMethod · 0.95
sizeMethod · 0.80
setVisibleMethod · 0.80
checkModifiedMethod · 0.80
removeMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected