Aurelien Pupier wrote:
> I want to set a global limit on undo/redo stack (as it is a EMF/GMF
> Operation it is huge...)
> I already set limit on each IUndoContext of editor but when we have a
> lot of opened editor it can be too much.
> How can I set a global limit?
Aurelien Pupier Messages: 551 Registered: July 2009 Location: Grenoble, FRANCE
thanks for your quick reply.
Effectively, reading more carefully some comment in the implementation of DefaultOperationHistory.setLimit :
* The limit checking methods interpret a null context as a global limit
* to be enforced. We do not wish to support a global limit in this
* implementation, so we throw an exception for a null context. The rest
* of the implementation can handle a null context, so subclasses can
* override this if a global limit is desired.
So as it is not possible there is the issue describe in my other post. (free the OperationHistory on editor closed)