Details
Description
1. Open a Model with existing mapped SQLTemplate queries.
2. Select a SQLTemplate -> SQLScripts tab
3. Select the entire SQL strinnd and do "Command C" (this is on Mac)
4. End result - the contents of the String are correctly placed on the clipboard, but the SQL Scripts window ends up with all content deleted and replaced with just letter "c".
When trying to undo this change, (Command Z), it is not undone, but letter "z" instead appended to the editor.
Running the same commands from the menu (copy, undo, etc.) works as expected, so ony keyboard shortcuts are broken.
At some point when playing with keyboard shortcuts, I even got the stack trace below. Just not sure how to reproduce it anymore. Also after that stacktrace the editor started behaving completely unpredictably, with values for different DB's displaying randomly, etc. Like I said, I couldn't reproduce it anymore after a restart.
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: javax.swing.undo.CannotUndoException
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:93)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.text.AbstractDocument$DefaultDocumentEvent.undo(AbstractDocument.java:2788)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.undo.TextCompoundEdit.undo(TextCompoundEdit.java:177)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.undo.TextCompoundEdit.undo(TextCompoundEdit.java:177)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.undo.TextCompoundEdit.undo(TextCompoundEdit.java:177)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at javax.swing.undo.UndoManager.undo(UndoManager.java:398)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.undo.CayenneUndoManager.undo(CayenneUndoManager.java:81)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.action.UndoAction.performAction(UndoAction.java:57)
Jul 17 12:53:46 garodnya [0x0-0x42042].CayenneModeler[762]: at org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:162)