Community
Participate
Working Groups
With Sirius 2 it was possible to use the containerView variable from the precondition field of a container creation tool. With Sirius 3 this variable is not anymore available in the completion and at runtime with aql.
I think this variable was never exposed (available in completion) but from what I see in the code [1], the containerView variable should be available for Node/ContainercreationTool. [1] org.eclipse.sirius.diagram.tools.internal.command.builders.AbstractDiagramCommandBuilder.genericCheckPrecondition(EObject, AbstractToolDescription)
Check with Mélanie: the variable is still available during the evaluation of the precondition. The containerView should be added in completion for the tool which use it during evaluation. An attempt was made by Cedric but it should be improved: see org.eclipse.sirius.business.api.dialect.description.AbstractInterpretedExpressionQuery.getAvailableVariables(): > if (this.target instanceof ToolDescription && feature == > ToolPackage.Literals.ABSTRACT_TOOL_DESCRIPTION__PRECONDITION) { > /* > * the containerView variable is accessible in the "precondition" > * feature of the ToolDescription. See GenericToolCommandBuilder. > */ > availableVariables.put("containerView", > VariableType.fromString("viewpoint.DSemanticDecorator")); > } The diagram specific code should be in org.eclipse.sirius.diagram.business.internal.dialect.description.DiagramInterpretedExpressionQuery