(ActionEvent e)
| 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()) { |
nothing calls this directly
no test coverage detected