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

Bug 497342

Summary: [ControlMode] LoadResourceSnippet makes changes without a transaction
Product: [Modeling] Papyrus Reporter: Christian Damus <give.a.damus>
Component: CoreAssignee: Christian Damus <give.a.damus>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 Flags: give.a.damus: neon+
Version: 2.0.0   
Target Milestone: 3.0.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/76638
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=31ce19683f796db0a5303ab890b2a31900d33a69
https://git.eclipse.org/r/76654
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=71ea8394cfc80ef8c2f7f6c2f35ff902be153c75
https://git.eclipse.org/r/76659
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=80b6288c1b031c8e95e0b8f46548cab4c4cf45a7
https://git.eclipse.org/r/76662
https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=74f8d20230a92668b9f4564fcf00906809e07c88
Whiteboard:
Bug Depends on:    
Bug Blocks: 496299    

Description Christian Damus CLA 2016-07-05 14:11:45 EDT
This bug was found in regression testing (JUnit test execution) of a prototype for bug 496299:  https://git.eclipse.org/r/#/c/76253/ and it blocks completion of that work.

The LoadResourceSnippet employed installed on the model-set by the Control Mode framework to make diagrams available from model sub-unit resources when they are loaded always fails to make its changes in a transaction when it modifies the editor's sash model.  The reason is that it uses the following statement to attempt to get the contextual editing domain:

    EditingDomain editingDomain = AdapterFactoryEditingDomain.getEditingDomainFor(resource);

but this can never work because a Resource is not a valid input; the result is always null, so the TransactionHelper call never starts a transaction and the editing domain ends up throwing IllegalStateException.
Comment 1 Christian Damus CLA 2016-07-05 20:45:54 EDT
Fixed on Neon.x and Oxygen (master) branches.
Comment 2 Eclipse Genie CLA 2016-07-06 00:01:16 EDT
New Gerrit change created: https://git.eclipse.org/r/76638
Comment 3 Eclipse Genie CLA 2016-07-06 00:01:29 EDT
Gerrit change https://git.eclipse.org/r/76638 was merged to [streams/2.0-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=31ce19683f796db0a5303ab890b2a31900d33a69
Comment 4 Eclipse Genie CLA 2016-07-06 00:01:47 EDT
New Gerrit change created: https://git.eclipse.org/r/76654
Comment 5 Eclipse Genie CLA 2016-07-06 00:01:54 EDT
Gerrit change https://git.eclipse.org/r/76654 was merged to [streams/2.0-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=71ea8394cfc80ef8c2f7f6c2f35ff902be153c75
Comment 6 Eclipse Genie CLA 2016-07-06 00:01:57 EDT
New Gerrit change created: https://git.eclipse.org/r/76659
Comment 8 Eclipse Genie CLA 2016-07-06 00:02:19 EDT
New Gerrit change created: https://git.eclipse.org/r/76662