Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Undo/Redo operations over Xtext model(Implementing undo/redo in Xtext)
Undo/Redo operations over Xtext model [message #1708694] Fri, 18 September 2015 15:52 Go to next message
Eclipse UserFriend
Hi guys,

We are building one simple UI to help the user to do drag and drop operations and then for each drop we generate some object to update the Xtext model, that is working great, now We would like to have some way to do undo and redo operations over the model.

Do you know if there is a simple way of implementing this using something from the framework or we need to do it by hand (Meaning for instance using one command stack and then write the undo logic for each command.

Thanks in advance.

Best regards,
Luis
Re: Undo/Redo operations over Xtext model [message #1708713 is a reply to message #1708694] Sat, 19 September 2015 04:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

this works out of the box if you use xtextdocument.modify to do the manipulation
Re: Undo/Redo operations over Xtext model [message #1708841 is a reply to message #1708713] Mon, 21 September 2015 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

I am using xtextdocument.modify but after dispatching the change the ctrl+z does not work. Do you know if I have to configure something?

Best regards,
Luis
Re: Undo/Redo operations over Xtext model [message #1708845 is a reply to message #1708841] Mon, 21 September 2015 15:17 Go to previous messageGo to next message
Eclipse UserFriend
no. i simply hit crtl z and it undoes my changes. what do you mean by dispatching the change
Re: Undo/Redo operations over Xtext model [message #1709084 is a reply to message #1708845] Wed, 23 September 2015 16:20 Go to previous message
Eclipse UserFriend
Hi Christian,

Thanks for your help, my problem was that I was modifying the model from one editor, then setting the text to a second one and then trying to do ctrl z in the second one

Regards,
Luis
Previous Topic:Creating custom, web-based editor
Next Topic:XMI to Xtext grammar
Goto Forum:
  


Current Time: Wed Nov 05 10:45:05 EST 2025

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

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

Back to the top