Skip to main content

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 10:00
Christoph Bach is currently offline Christoph BachFriend
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

Previous Topic:GEF Documentation
Next Topic:Undo/Redo Buttons stay disabled
Goto Forum:

Current Time: Mon Jun 18 04:17:51 GMT 2018

Powered by FUDForum. Page generated in 0.01869 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top