Im not sure if this is a JGo issue. I have a label for a link and this label can contains shapes which represent other items i.e a square represents a stored procedure which exits for this state a circle represents something else. I have a JDialog box which comes up when I click on the label. The stored procedure can be changed or deleted. If I click on redo or undo the square is displayed once again if it had been deleted lets say, but if I click on the label the dialog box does not once again contain the previous info. My question is how would I go about storing this info so that once redo undo is selected it can also restore this information back to its previous state.
You’ll need to extend the UndoManager support to include your own information and the ability to undo/redo edits.
The UndoManager is just a Swing thing, so you can read up on that. (If you are using JGo for SWT, we reimplemented all the relevant functionality so there’s no dependence on Swing or AWT.)
But it’s probably easiest to extend JGo’s support for UndoableEdits. That’s discussed in the User Guide for fields/properties that you add to a JGoObject, and also demonstrated in the example classes. You can extend that to include any information you have that is associated with a JGoObject, such as a JGoLabeledLink.