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

Method startCompoundEdit

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

Use before a manipulating text to group editing operations together as a single undo. Use stopCompoundEdit() once finished.

()

Source from the content-addressed store, hash-verified

1752 * as a single undo. Use stopCompoundEdit() once finished.
1753 */
1754 public void startCompoundEdit() {
1755 // Call endTextEditHistory() before starting a new CompoundEdit,
1756 // because there's a timer that's possibly set off for 3 seconds after
1757 // which endTextEditHistory() is called, which means that things get
1758 // messed up. Hence, manually call this method so that auto-format gets
1759 // undone in one fell swoop if the user calls auto-formats within 3
1760 // seconds of typing in the last character. Then start a new compound
1761 // edit so that the auto-format can be undone in one go.
1762 // https://github.com/processing/processing/issues/3003
1763 endTextEditHistory(); // also calls stopCompoundEdit()
1764
1765 //stopCompoundEdit();
1766 compoundEdit = new CompoundEdit();
1767 caretUndoStack.push(textarea.getCaretPosition());
1768 caretRedoStack.clear();
1769 }
1770
1771
1772 /**

Callers 10

setTextMethod · 0.95
insertTextMethod · 0.95
setLineTextMethod · 0.95
beginCompoundEditMethod · 0.95
undoableEditHappenedMethod · 0.95
handleAutoFormatMethod · 0.95
handleIndentOutdentMethod · 0.95
replaceAllMethod · 0.80
renameMethod · 0.80

Calls 4

endTextEditHistoryMethod · 0.95
getCaretPositionMethod · 0.80
pushMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected