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

Method handleSaveAs

app/src/processing/app/Editor.java:1947–1983  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1945
1946
1947 public boolean handleSaveAs() {
1948 //stopRunner(); // formerly from 0135
1949 handleStop();
1950
1951 toolbar.activateSave();
1952
1953 //SwingUtilities.invokeLater(new Runnable() {
1954 //public void run() {
1955 statusNotice(tr("Saving..."));
1956 try {
1957 if (sketchController.saveAs()) {
1958 base.storeRecentSketches(sketchController);
1959 base.rebuildRecentSketchesMenuItems();
1960 statusNotice(tr("Done Saving."));
1961 // Disabling this for 0125, instead rebuild the menu inside
1962 // the Save As method of the Sketch object, since that's the
1963 // only one who knows whether something was renamed.
1964 //sketchbook.rebuildMenusAsync();
1965 } else {
1966 statusNotice(tr("Save Canceled."));
1967 return false;
1968 }
1969 } catch (Exception e) {
1970 // show the error as a message in the window
1971 statusError(e);
1972
1973 } finally {
1974 // make sure the toolbar button deactivates
1975 toolbar.deactivateSave();
1976
1977 // Update editor window title in case of "Save as..."
1978 updateTitle();
1979 header.rebuild();
1980 }
1981
1982 return true;
1983 }
1984
1985
1986 private boolean serialPrompt() {

Callers 3

buildFileMenuMethod · 0.95
handleSaveMethod · 0.95

Calls 11

handleStopMethod · 0.95
statusNoticeMethod · 0.95
statusErrorMethod · 0.95
updateTitleMethod · 0.95
activateSaveMethod · 0.80
trMethod · 0.80
storeRecentSketchesMethod · 0.80
deactivateSaveMethod · 0.80
rebuildMethod · 0.80
saveAsMethod · 0.45

Tested by

no test coverage detected