diff options
| author | Belqassim Djafer | 2015-05-06 13:57:10 +0000 |
|---|---|---|
| committer | Maxime Porhel | 2015-05-12 12:59:08 +0000 |
| commit | 623f0db6eabf6a2387688ff316020546a0690f1f (patch) | |
| tree | 160def9f2153b49dad876878600248f23671d59e | |
| parent | 0726c2fd312256b7a3e9b38fcccb05e5cc7fcdd8 (diff) | |
| download | org.eclipse.sirius-623f0db6eabf6a2387688ff316020546a0690f1f.tar.gz org.eclipse.sirius-623f0db6eabf6a2387688ff316020546a0690f1f.tar.xz org.eclipse.sirius-623f0db6eabf6a2387688ff316020546a0690f1f.zip | |
[456140] Update variable annotations on TreeItemMapping features
The variable "view" has been removed from the annotations placed on
semanticCandidates and preCondition expressions in TreeItemMapping.
Eventually the variable "tree" has been added as available variable for
these expressions.
Bug: 456140
Change-Id: I5675973c1ecf69af4fff586f182c9a334a129fd1
Signed-off-by: Belqassim Djafer <belqassim.djafer@obeo.fr>
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/org.eclipse.sirius.tree/model/tree.ecore b/plugins/org.eclipse.sirius.tree/model/tree.ecore index 8419d5c784..27c7dcac62 100644 --- a/plugins/org.eclipse.sirius.tree/model/tree.ecore +++ b/plugins/org.eclipse.sirius.tree/model/tree.ecore @@ -90,7 +90,7 @@ <details key="returnType" value="a Collection<EObject> or an EObject."/> </eAnnotations> <eAnnotations source="http://www.eclipse.org/sirius/interpreted/expression/variables"> - <details key="view" value="tree.DTreeElement | current DTreeElement."/> + <details key="tree" value="tree.DTree | current DTree."/> <details key="containerView" value="ecore.EObject | container of the current DTreeElement (variable is available if container is not null)."/> <details key="container" value="ecore.EObject | semantic target of $containerView (if it is a DSemanticDecorator)."/> </eAnnotations> @@ -107,7 +107,7 @@ <details key="returnType" value="a Collection<EObject> or an EObject."/> </eAnnotations> <eAnnotations source="http://www.eclipse.org/sirius/interpreted/expression/variables"> - <details key="view" value="tree.DTreeElement | current DTreeElement."/> + <details key="tree" value="tree.DTree | current DTree."/> <details key="containerView" value="ecore.EObject | container of the current DTreeElement (variable is available if container is not null)."/> <details key="container" value="ecore.EObject | semantic target of $containerView (if it is a DSemanticDecorator)."/> </eAnnotations> diff --git a/plugins/org.eclipse.sirius.tree/src-gen/org/eclipse/sirius/tree/description/impl/DescriptionPackageImpl.java b/plugins/org.eclipse.sirius.tree/src-gen/org/eclipse/sirius/tree/description/impl/DescriptionPackageImpl.java index 6658f11c6b..fefc64ce71 100644 --- a/plugins/org.eclipse.sirius.tree/src-gen/org/eclipse/sirius/tree/description/impl/DescriptionPackageImpl.java +++ b/plugins/org.eclipse.sirius.tree/src-gen/org/eclipse/sirius/tree/description/impl/DescriptionPackageImpl.java @@ -1362,10 +1362,10 @@ public class DescriptionPackageImpl extends EPackageImpl implements DescriptionP protected void createVariablesAnnotations() { String source = "http://www.eclipse.org/sirius/interpreted/expression/variables"; addAnnotation(getTreeDescription_PreconditionExpression(), source, new String[] {}); - addAnnotation(getTreeItemMapping_PreconditionExpression(), source, new String[] { "view", "tree.DTreeElement | current DTreeElement.", "containerView", + addAnnotation(getTreeItemMapping_PreconditionExpression(), source, new String[] { "tree", "tree.DTree | current DTree.", "containerView", "ecore.EObject | container of the current DTreeElement (variable is available if container is not null).", "container", "ecore.EObject | semantic target of $containerView (if it is a DSemanticDecorator)." }); - addAnnotation(getTreeItemMapping_SemanticCandidatesExpression(), source, new String[] { "view", "tree.DTreeElement | current DTreeElement.", "containerView", + addAnnotation(getTreeItemMapping_SemanticCandidatesExpression(), source, new String[] { "tree", "tree.DTree | current DTree.", "containerView", "ecore.EObject | container of the current DTreeElement (variable is available if container is not null).", "container", "ecore.EObject | semantic target of $containerView (if it is a DSemanticDecorator)." }); addAnnotation(getTreeMapping_SemanticElements(), source, new String[] { "view", "tree.DTreeElement | current DTreeElement.", "containerView", diff --git a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/dialect/common/tree/TreeItemMappingExpression.java b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/dialect/common/tree/TreeItemMappingExpression.java index 9f3acffad0..edecd3458c 100644 --- a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/dialect/common/tree/TreeItemMappingExpression.java +++ b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/internal/dialect/common/tree/TreeItemMappingExpression.java @@ -67,7 +67,7 @@ public class TreeItemMappingExpression { if (!StringUtil.isEmpty(mapping.getPreconditionExpression())) { interpreter.setVariable(IInterpreterSiriusVariables.CONTAINER_VIEW, containerView); interpreter.setVariable(IInterpreterSiriusVariables.CONTAINER, containerView.getTarget()); - interpreter.setVariable(TREE, TreeHelper.getTree(semantic)); + interpreter.setVariable(TREE, TreeHelper.getTree(containerView)); try { result = interpreter.evaluateBoolean(semantic, mapping.getPreconditionExpression()); |
