Community
Participate
Working Groups
Steps to reproduce : Create a VSM with an OperationAction in the implementation add a "browse" model operation with var:diagram right click and validate => You get an error stating the current context has no "diagram" variable accessible Yet in UndoRedoCapableEMFCommandFactory.buildOperationActionFromTool(OperationAction, EObject, Collection<DSemanticDecorator>) We have the following code : DSemanticDecorator firstContainerView = null; if (containerViews != null && containerViews.size() > 0) { firstContainerView = containerViews.iterator().next(); addDiagramVariable(result, firstContainerView, interpreter); } which is declaring the "diagram" variable if any there are containerViews.
For reference: you can also reproduce this problem by validating the "Design" viewpoint which is part of ecore.odesign in EcoreTools
Created attachment 252711 [details] Test VSM to reproduce the issue Confirmed on current master with the attached VSM.
The "not so clean" part is that OperationAction is defined in viewpoint.ecore which is not supposed to know about "diagram" and that such operation can be defined within the context of Tree representation for instance. That means defining it as *accessible* in viewpoint.ecore is wrong, but making sure it is available in the code completion and validation based on the current structure of the VSM is the best option.
New Gerrit change created: https://git.eclipse.org/r/46406
Gerrit change https://git.eclipse.org/r/46406 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=34acb43c3371a057814c08e561fca5e3c52d4322
Fixed for M7.
Verified with Sirius 3.0.0 RC1
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.