Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » global limit on undo/redo stack
global limit on undo/redo stack [message #508871] Wed, 20 January 2010 10:36 Go to next message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 556
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

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?

Regards,

Aurelien



Aurélien Pupier - BonitaSoft S.A.
My blog
My company Eclipse-related blog
Re: global limit on undo/redo stack [message #508883 is a reply to message #508871] Wed, 20 January 2010 11:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25939
Registered: July 2009
Senior Member
Aurelien,

There isn't such a global limit.


Aurelien Pupier wrote:
> Hi,
>
> 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?
>
> Regards,
>
> Aurelien
>
>
[SOLVED]Re: global limit on undo/redo stack [message #508895 is a reply to message #508871] Wed, 20 January 2010 11:16 Go to previous message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 556
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

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.
		 */
		Assert.isNotNull(context);


So as it is not possible there is the issue describe in my other post. (free the OperationHistory on editor closed)



Aurélien Pupier - BonitaSoft S.A.
My blog
My company Eclipse-related blog
Previous Topic:OperationHistory not cleaned after editor closed
Next Topic:Eclipse launcher & max heap size problem
Goto Forum:
  


Current Time: Tue Jul 29 10:49:31 EDT 2014

Powered by FUDForum. Page generated in 0.01527 seconds