MCPcopy Index your code
hub / github.com/benfry/processing4 / handleSave

Method handleSave

app/src/processing/app/ui/Editor.java:2130–2146  ·  view source on GitHub ↗

Actually handle the save command. If 'immediately' is set to false, this will happen in another thread so that the message area will update and the save button will stay highlighted while the save is happening. If 'immediately' is true, then it will happen immediately. This is used during a quit, be

(boolean immediately)

Source from the content-addressed store, hash-verified

2128 * <A HREF="https://download.processing.org/bugzilla/276.html">Bug 276</A>.
2129 */
2130 public boolean handleSave(boolean immediately) {
2131 // This was a mistake (rectified in 0136) that would cause long-running
2132 // sketches to be interrupted, causing much sadness.
2133 //handleStop();
2134
2135 if (sketch.isUntitled()) {
2136 return handleSaveAs();
2137 // need to get the name, user might also cancel here
2138
2139 } else if (immediately) {
2140 handleSaveImpl();
2141
2142 } else {
2143 EventQueue.invokeLater(this::handleSaveImpl);
2144 }
2145 return true;
2146 }
2147
2148
2149 protected void handleSaveImpl() {

Callers 2

buildFileMenuMethod · 0.95
checkModifiedMethod · 0.95

Calls 3

handleSaveAsMethod · 0.95
handleSaveImplMethod · 0.95
isUntitledMethod · 0.80

Tested by

no test coverage detected