Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » JFace Texteditor - Custom Undo
JFace Texteditor - Custom Undo [message #905964] Fri, 31 August 2012 11:34 Go to next message
Sevi Voest is currently offline Sevi VoestFriend
Messages: 2
Registered: August 2012
Junior Member
Hello,

I am currently developing a TextEditor using JFace and seeking to replace the standard Undo functionality with a custom one.

Is there a tutorial available to do this and to replicate the appearance of the standard implementation (i.e., icon in context menu, key bindings)?

So far I have tried providing my own implementation of IUndoManager in my source viewer's configuration, but while this might suffice functionality-wise, the element in the context menu does not assume the appearance of the standard implementation and I failed to reengineer how the default implementation achieves this. Also, I am unsure whether this implementation is correct and what exactly the IUndoContext's purpose is.

If someone could help me with this, I would be very much relieved Smile
Re: JFace Texteditor - Custom Undo [message #909507 is a reply to message #905964] Fri, 07 September 2012 08:56 Go to previous message
Sevi Voest is currently offline Sevi VoestFriend
Messages: 2
Registered: August 2012
Junior Member
Just posting this for completeness, in case anyone runs across the same problem:

The way to go is to override createUndoRedoActions() such that the UndoActionHandler is replaced with a custom Action that contains the required implementation for Undo.
Previous Topic:java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jface.text.TextSelection
Next Topic:Customizing content assistant
Goto Forum:
  


Current Time: Thu Apr 25 15:31:12 GMT 2024

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

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

Back to the top