|Create Request/Command by clicking a regular Button [message #881301]
||Mon, 04 June 2012 10:00
| Christoph Bach
Registered: June 2012
I am new to Eclipse Plugin Development and GEF and have a question.
I have some Draw2D Buttons in my editor which should add or remove some Objects from a List in the model.
I want to support Undo/Redo, so my problem is, what to do in the actionPerformed method in the Listener. I found an old thread from 2009 in which the reply to a similar question was to create the Command there.
But what next? I am able to create a Command there, but how do I tell the CommandStack to execute it? Do I have to create some Policies and Custom-Requests? What would you do?
I just want to do the following:
User hits "+" button -> a new object is added to the list in the model -> update view and shows now new number of objects
Powered by FUDForum
. Page generated in 0.02532 seconds