Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333021

Summary: IUndoContext should not be disposed if in use in other editors (shared editing domain)
Product: [Modeling] GMF-Runtime Reporter: Baptiste Mesta <baptiste.mesta>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: baptiste.mesta
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Modified Default operation history "dispose" function none

Description Baptiste Mesta CLA 2010-12-21 09:56:42 EST
Build Identifier: 20100617-1415

If we use a shared editing domain, closing the editor result in the EditingDomainUndoContext be disposed (flushed).
But the undo context is shared between more than one editor. This break the undo of other editors.
It should be disposed only when the last editor using the editing domain is closed.
I've made a quick and dirty fix for our RCP application but it can't be integrated in the DefaultOperationHistory. Instead the org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.stopListening() should be modified to not dispose the undo context and Editing domain should be responsible of disposing it.

Reproducible: Always

Steps to Reproduce:
1.Have multiple editors using the same editing domain
2. open 2 editors
3. close one of them
4. the undo stack of the first one is broke
Comment 1 Baptiste Mesta CLA 2010-12-21 09:57:42 EST
Created attachment 185638 [details]
Modified Default operation history "dispose" function