use of org.obeonetwork.dsl.environment.BindingElement 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);
}
}
use of org.obeonetwork.dsl.environment.BindingElement in project InformationSystem by ObeoNetwork.
the class BindingElementItemProvider method getText.
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
@Override
public String getText(Object object) {
String label = " ";
BindingElement bindingElement = (BindingElement) object;
if (bindingElement.getBoundElement() != null) {
label += labelProvider.getText(bindingElement.getBoundElement());
}
return " ".equals(label) ? getString("_UI_BindingElement_type") : getString("_UI_BindingElement_type") + " " + label;
}
Aggregations