MCPcopy Index your code
hub / github.com/processing/processing / handleSave

Method handleSave

java/src/processing/mode/java/JavaEditor.java:1629–1660  ·  view source on GitHub ↗
(boolean immediately)

Source from the content-addressed store, hash-verified

1627
1628
1629 @Override
1630 public boolean handleSave(boolean immediately) {
1631 // note modified tabs
1632 final List<String> modified = new ArrayList<>();
1633 for (int i = 0; i < getSketch().getCodeCount(); i++) {
1634 SketchCode tab = getSketch().getCode(i);
1635 if (tab.isModified()) {
1636 modified.add(tab.getFileName());
1637 }
1638 }
1639
1640 boolean saved = super.handleSave(immediately);
1641 if (saved) {
1642 if (immediately) {
1643 for (String tabFilename : modified) {
1644 addBreakpointComments(tabFilename);
1645 }
1646 } else {
1647 EventQueue.invokeLater(new Runnable() {
1648 @Override
1649 public void run() {
1650 for (String tabFilename : modified) {
1651 addBreakpointComments(tabFilename);
1652 }
1653 }
1654 });
1655 }
1656 }
1657 // if file location has changed, update autosaver
1658 // autosaver.reloadAutosaveDir();
1659 return saved;
1660 }
1661
1662
1663 /**

Callers 3

actionPerformedMethod · 0.95
autoSaveMethod · 0.95

Calls 7

isModifiedMethod · 0.95
getFileNameMethod · 0.95
addBreakpointCommentsMethod · 0.95
getCodeCountMethod · 0.80
getSketchMethod · 0.80
getCodeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected