Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333021 - IUndoContext should not be disposed if in use in other editors (shared editing domain)
Summary: IUndoContext should not be disposed if in use in other editors (shared editin...
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 09:56 EST by Baptiste Mesta CLA
Modified: 2010-12-21 10:14 EST (History)
1 user (show)

See Also:


Attachments
Modified Default operation history "dispose" function (1.37 KB, text/plain)
2010-12-21 09:57 EST, Baptiste Mesta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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