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

Method actionPerformed

app/src/processing/app/ui/Editor.java:1187–1217  ·  view source on GitHub ↗
(ActionEvent e)

Source from the content-addressed store, hash-verified

1185 }
1186
1187 public void actionPerformed(ActionEvent e) {
1188 stopCompoundEdit();
1189
1190 try {
1191 undo.redo();
1192 } catch (CannotRedoException ex) {
1193 //System.out.println("Unable to redo: " + ex);
1194 //ex.printStackTrace();
1195 }
1196 try {
1197 final Integer caret = caretRedoStack.pop();
1198 caretUndoStack.push(caret);
1199 textarea.setCaretPosition(caret);
1200 } catch (Exception ignore) {
1201 }
1202 updateRedoState();
1203 undoAction.updateUndoState();
1204 if (sketch != null) {
1205 sketch.setModified(!getText().equals(sketch.getCurrentCode().getSavedProgram()));
1206 // Go through all tabs; Replace All, Rename or Undo could have changed them
1207 for (SketchCode sc : sketch.getCode()) {
1208 if (sc.getDocument() != null) {
1209 try {
1210 sc.setModified(!sc.getDocumentText().equals(sc.getSavedProgram()));
1211 } catch (BadLocationException ignore) {
1212 }
1213 }
1214 }
1215 repaintHeader();
1216 }
1217 }
1218
1219 protected void updateRedoState() {
1220 if (undo.canRedo()) {

Callers

nothing calls this directly

Calls 15

updateRedoStateMethod · 0.95
stopCompoundEditMethod · 0.80
redoMethod · 0.80
setCaretPositionMethod · 0.80
updateUndoStateMethod · 0.80
getSavedProgramMethod · 0.80
getCurrentCodeMethod · 0.80
getCodeMethod · 0.80
getDocumentTextMethod · 0.80
repaintHeaderMethod · 0.80
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected