# This file is part of the Coral project.
# Please read the copyright notice in the LICENSE file.

import coral
from coral.modeler.diagram.ui import DiagramElementUI

class ModelRelationshipUI(DiagramElementUI):

    def accepts(self, element):
        if element and element.oclIsKindOf(coral.lang.Manage10.ManagedModel):
            return True
        return False

    def relink(self, dep, sv, end):
        if end==0:
            dep.source = sv
        else:
            dep.target = sv




