Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326464 - [xtext.gmf.glue-ConcurrentModifications] Support DiagramEditors changing EditorInputs
Summary: [xtext.gmf.glue-ConcurrentModifications] Support DiagramEditors changing Edit...
Status: CLOSED WORKSFORME
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 16:48 EDT by Moritz Eysholdt CLA
Modified: 2012-11-14 05:40 EST (History)
1 user (show)

See Also:


Attachments
xtext.gmf.glue: Support Changing Editor Inputs for DiagramEditors (5.28 KB, patch)
2010-09-28 16:49 EDT, Moritz Eysholdt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2010-09-28 16:48:10 EDT
If a DiagramEditor gets assigned a new EditorInput, it instantiates a new EditingDomain. However, the current implementation of ConcurrentModificationObserver does not react to these changes which means the old (and wrong) EditingDomain is continued to be observed.

In my use case the DiagramEditor's Input is changed because if the user opens a the editor he/she first sees a Eclipse Forms based UI from which he can select the model element he/she wants to edit in GMF. This selection causes to re-set the EditorInput.

I've fixed this issue by additionally listening to changes of the editor input and I'll attach the fix as a patch. Let's see if my use case is just to special or if this is useful for someone else.
Comment 1 Moritz Eysholdt CLA 2010-09-28 16:49:38 EDT
Created attachment 179788 [details]
xtext.gmf.glue: Support Changing Editor Inputs for DiagramEditors
Comment 2 Jan Koehnlein CLA 2010-09-29 04:14:54 EDT
Correct me if I am wrong, but I cannot find where you deregister/dispose the EditingDomainAdapter. As the editing domain's lifecycle could exceed the one of the editor, this is necessary.
Comment 3 Sven Efftinge CLA 2012-11-14 05:40:26 EST
see comment 2