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

Method updateUndoState

app/src/processing/app/ui/Editor.java:1153–1177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1151 }
1152
1153 protected void updateUndoState() {
1154 if (undo.canUndo() || compoundEdit != null && compoundEdit.isInProgress()) {
1155 this.setEnabled(true);
1156 undoItem.setEnabled(true);
1157 String newUndoPresentationName = Language.text("menu.edit.undo");
1158 if (undo.getUndoPresentationName().equals("Undo addition")) {
1159 newUndoPresentationName += " "+Language.text("menu.edit.action.addition");
1160 } else if (undo.getUndoPresentationName().equals("Undo deletion")) {
1161 newUndoPresentationName += " "+Language.text("menu.edit.action.deletion");
1162 }
1163 undoItem.setText(newUndoPresentationName);
1164 putValue(Action.NAME, newUndoPresentationName);
1165// if (sketch != null) {
1166// sketch.setModified(true); // 0107, removed for 0196
1167// }
1168 } else {
1169 this.setEnabled(false);
1170 undoItem.setEnabled(false);
1171 undoItem.setText(Language.text("menu.edit.undo"));
1172 putValue(Action.NAME, Language.text("menu.edit.undo"));
1173// if (sketch != null) {
1174// sketch.setModified(false); // 0107
1175// }
1176 }
1177 }
1178 }
1179
1180

Callers 4

actionPerformedMethod · 0.95
actionPerformedMethod · 0.80
stopCompoundEditMethod · 0.80
setCodeMethod · 0.80

Calls 3

textMethod · 0.95
equalsMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected