getSelectedElements().get(0) instanceof UmlConnection) {
UmlConnection conn = (UmlConnection) getSelectedElements().get(0);
Relation relation = (Relation) conn.getModelElement();
// Setup a toggle
if (endType == RelationEndType.SOURCE) {
execute(new SetConnectionNavigabilityCommand(this, conn, endType,
!relation.isNavigableToElement1()));
}
if (endType == RelationEndType.TARGET) {
execute(new SetConnectionNavigabilityCommand(this, conn, endType,
!relation.isNavigableToElement2()));
}
}
}