Bug #3185

Ctrl-z does not "undo" in RExpression actor

Added by Kevin Drury over 14 years ago. Updated over 14 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Ctrl-c (copy) and Ctrl-v (paste) work as expected in the RExpression actor. Is it possible to also make Ctrl-z (undo) work within the R-code window?

Related issues

Blocks Kepler - Bug #3191: Merge TextEditor changes with ptII sourceResolved03/28/2008


#1 Updated by ben leinfelder over 14 years ago

Locally, I have implemented an UndoableEditListener for the JTextArea that is used in ptolemy.gui.Query along with some supporting inner classes to facilitate the undoing and redoing of text edits. This change would cascade to all actors when editing their parameters. While it seems like a useful feature to provide, it is in a ptII class and therefore should probably be reviewed by the larger community.

I've used the standard Ctrl+Z and Ctrl+Y shortcut mappings for undo and redo respectively. And yes, "Ctrl" translates to "open apple/command" key on the Mac.

#2 Updated by ben leinfelder over 14 years ago

from kepler-dev email that i sent:
After looking at this again, I realized it could be made even more
generic by creating the UndoableEditListener implementation as a
regular class (not inner). That way the
can make use of the same code. The PythonScript actor seems to makes
use of the TextEditor when you "Configure Actor" (from the context
menu). It would be nice to provide the undo feature there, too.

We could also do something similar with the RExpression actor (but
instead use the text editor when "Open Actor" is invoked). Using the
editor for R would address a few concerns we've heard about the
current editing window being too small and also demanding window focus
until the text changes were "committed".
See and

#3 Updated by ben leinfelder over 14 years ago

This has been added in the ptolemy base classes now.

#4 Updated by Redmine Admin over 9 years ago

Original Bugzilla ID was 3185

Also available in: Atom PDF