| Summary: | Check the need for WorkspaceCommandStackImpl | ||
|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Michael Wenz <michael.wenz> |
| Component: | Core | Assignee: | Michael Wenz <michael.wenz> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | michael.wenz:
indigo+
michael.wenz: juno+ |
| Version: | 0.8.0 | ||
| Target Milestone: | 0.8.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Juno M1 theme_bugs Indigo SR1 | ||
Would like to target for Juno Graphiti only requires a TransactionalCommandStack, the cast was only needed to be able to pass the execution info object into the execution of a feature command. I changed this to use the standard options used by EMF transactions. Now there is only the need to pass a TransactionalCommandStack which is required anyway (and is also created when a standard TransactionalEditingDomain is created). Also created a test for this in: org.eclipse.graphiti.ui.tests.CommandStackTest#testCanUsePlainTransactionalCommandStack Check if this should go to Indigo SR1 as well Checked in to Indigo SR1 RC2: commit d3ec81b8dbbbdc9615dd837f299ad4158a5506ee Author: mwenz <mwenz> 2011-07-25 10:23:32 Committer: Michael Wenz <michael.wenz@sap.com> 2011-08-19 09:59:04 Parent: 247ecca1b77b0acb651b9ba49b81547b2e4ab5a2 (Bug 351053 - Remove the need for WorkspaceCommandStackImpl) Branches: origin/b0_8_x, b0_8_x Bug 351053 - Remove the need for WorkspaceCommandStackImpl Part of Graphiti 0.9.0 (Eclipse Juno) |
By default Graphiti uses a WorkspaceCommandStackImpl as EMF command stack in the TransactionalEditingDomain. This is automatically set while creating the domain using Graphiti's service method. On the other hand the specific stack seems not to be necessary except for passing the execution info object to the inner command execution. Check if this could be done using the standard command stack of the TransactionalEditingDomain. Currently when using the standard command stack a CCE is thrown: java.lang.ClassCastException: org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl cannot be cast to org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.<init>(GFCommandStack.java:67) at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.setConfigurationProvider(DiagramEditorInternal.java:1591) at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.setInput(DiagramEditorInternal.java:618) at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:346) at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1093)