use of org.obeonetwork.dsl.environment.bindingdialect.DBoundElement in project InformationSystem by ObeoNetwork.
the class TreeDataProvider method computeData.
public void computeData() {
edges = new ArrayList<DBindingEdge>();
leftRoot = BindingdialectFactory.eINSTANCE.createDBoundElement();
leftRoot.setTarget(bindingInfo.getLeft());
rightRoot = BindingdialectFactory.eINSTANCE.createDBoundElement();
rightRoot.setTarget(bindingInfo.getRight());
for (BindingReference bindingReference : bindingInfo.getReferences()) {
BindingElement leftBindingElement = bindingReference.getLeft();
BindingElement rightBindingElement = bindingReference.getRight();
List<BoundableElement> leftPathReferences = new ArrayList<BoundableElement>(leftBindingElement.getPathReferences());
leftPathReferences.add(leftBindingElement.getBoundElement());
DBoundElement leftBoundElement = getBoundElement(leftRoot, leftPathReferences);
List<BoundableElement> rightPathReferences = new ArrayList<BoundableElement>(rightBindingElement.getPathReferences());
rightPathReferences.add(rightBindingElement.getBoundElement());
DBoundElement rightBoundElement = getBoundElement(rightRoot, rightPathReferences);
DBindingEdge edge = BindingdialectFactory.eINSTANCE.createDBindingEdge();
edge.setTarget(bindingReference);
edge.setLeft(leftBoundElement);
edge.setRight(rightBoundElement);
edges.add(edge);
}
}
Aggregations