Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to Track Undo Command(Undo the Actions using CommandStack)
How to Track Undo Command [message #673561] Tue, 24 May 2011 06:17 Go to next message
Maqsood Ahmed is currently offline Maqsood AhmedFriend
Messages: 41
Registered: September 2010
Member
Hi ,

We need to track the Undo/Redo Command which was performed on the last context menu action.
We are using the method commandStackChanged from the Diagram Editor Class.
Our aim is : To Undo the Last action(clearing our buffer) based on context menu action execution.

Issue
1) This Command Stack changed method is getting called everytime once ,any Context menu item is clicked.
2) We use label to identify which action has to be undone but still , we cannot track the Undo Command Label since it(method) is getting called before even we do undo(i'e, for any action done)

Pls help , as to how to track or perform my real Undo only if undo action is executed.

Thanks
Mak

Re: How to Track Undo Command [message #673648 is a reply to message #673561] Tue, 24 May 2011 10:27 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
In M7 we introduced to option to add own operations to undo/redo in the
editor. See http://www.eclipse.org/graphiti/pages/whats-new.html, under M7,
"Undo/Redo support for Non-EMF domain models".

Is that what you are looking for?

Michael

wrote in message news:irfi2d$v75$1@news.eclipse.org...

Hi ,

We need to track the Undo/Redo Command which was performed on the last
context menu action.
We are using the method commandStackChanged from the Diagram Editor Class.
Our aim is : To Undo the Last action(clearing our buffer) based on context
menu action execution.

Issue
1) This Command Stack changed method is getting called everytime once ,any
Context menu item is clicked.
2) We use label to identify which action has to be undone but still , we
cannot track the Undo Command Label since it(method) is getting called
before even we do undo(i'e, for any action done)

Pls help , as to how to track or perform my real Undo only if undo action is
executed.

Thanks
Mak
Previous Topic:Resize child shapes when parent resized
Next Topic:DirectEditingFeature with TYPE_DIALOG type
Goto Forum:
  


Current Time: Fri Jul 10 10:58:58 GMT 2020

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

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

Back to the top