Summary: | containerView variable from container creation tool is not anymore visible | ||
---|---|---|---|
Product: | [Modeling] Sirius | Reporter: | Melanie Bats <melanie.bats> |
Component: | Diagram | Assignee: | Project Inbox <sirius.diagram-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | maxime.porhel, pierre-charles.david |
Version: | 3.0.0 | Keywords: | triaged |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Melanie Bats
2015-07-23 11:11:10 EDT
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
|