/**
* Connects two DISPEL elements.
*/
public Connection create(ICreateConnectionContext context) {
Anchor sAnchor = context.getSourceAnchor();
//Move the source anchor to CI if we have a literal
Object o = getBusinessObjectForPictogramElement(sAnchor.getParent());
if (Utility.isObjectLiteral(o)) {
PictogramElement pe = getFeatureProvider(
).getPictogramElementForBusinessObject(
Utility.getParentLocalVariableStatement(
(EObject) o));
if (pe instanceof AnchorContainer) {
sAnchor = ((AnchorContainer) pe).getAnchors().get(0);
}
}
Anchor tAnchor = context.getTargetAnchor();
ConnectionStatement cs = createAndAddConnectionStatement(
sAnchor, tAnchor);
// add connection for business object