Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Create Request/Command by clicking a regular Button(How do I put a Command manually on the CommandStack after hitting a Button?)
Create Request/Command by clicking a regular Button [message #881301] Mon, 04 June 2012 06:00
Christoph Bach is currently offline Christoph Bach
Messages: 5
Registered: June 2012
Junior Member
Hey Folks,

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

Regards,
Christoph
Previous Topic:GEF Documentation
Next Topic:GraphicalEditor createActions() method is not called
Goto Forum:
  


Current Time: Thu Aug 21 02:36:32 EDT 2014

Powered by FUDForum. Page generated in 0.03053 seconds