Changeset 1080

Show
Ignore:
Timestamp:
11/21/06 03:02:58 (2 years ago)
Author:
arjanmol
Message:

fixed error that made it into svn.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/branches/new-canvas/gaphor/adapters/connectors.py

    r1079 r1080  
    2121 
    2222    def side(self, handle_pos, glued): 
    23         """Determine the side on which the handle is connecting. 
     23        """ 
     24        Determine the side on which the handle is connecting. 
    2425        This is done by determining the proximity to the nearest edge. 
    2526        """ 
     
    3839 
    3940    def glue(self, handle, x, y): 
    40         """Return the point the handle could connect to. None if no connection 
     41        """ 
     42        Return the point the handle could connect to. None if no connection 
    4143        is allowed. 
    4244        """ 
     
    4648 
    4749    def connect(self, handle, x, y): 
    48         """Connect to an element. Note that at this point the line may 
     50        """ 
     51        Connect to an element. Note that at this point the line may 
    4952        be connected to some other, or the same element by means of the 
    5053        handle.connected_to property. Also the connection at UML level 
     
    8689 
    8790    def disconnect_constraints(self, handle): 
    88         """Disconnect() takes care of disconnecting the handle from the 
     91        """ 
     92        Disconnect() takes care of disconnecting the handle from the 
    8993        element it's attached to, by removing the constraints. 
    9094        """ 
     
    97101 
    98102    def disconnect(self, handle): 
    99         """Do a full disconnect, also disconnect at UML model level. 
     103        """ 
     104        Do a full disconnect, also disconnect at UML model level. 
    100105        Subclasses should disconnect model-level connections. 
    101106        """ 
     
    105110 
    106111class CommentLineConnect(SimpleConnect): 
    107     """Connect a comment line to a comment item. 
     112    """ 
     113    Connect a comment line to a comment item. 
    108114    Connect Comment.annotatedElement to any element 
    109115     
     
    112118    """ 
    113119    component.adapts(items.ElementItem, items.CommentLineItem) 
    114     component.adapts(items.DiagramLine, items.CommentLineItem) 
    115  
    116     def glue(self, handle, x, y): 
    117         """In addition to the normal check, both line ends may not be connected 
     120 
     121    def glue(self, handle, x, y): 
     122        """ 
     123        In addition to the normal check, both line ends may not be connected 
    118124        to the same element. Same goes for subjects. 
    119125        One of the ends should be connected to a UML.Comment element. 
     
    163169 
    164170class RelationshipConnect(SimpleConnect): 
    165     """Base class for relationship connections, such as Association, 
     171    """ 
     172    Base class for relationship connections, such as Association, 
    166173    dependencies and implementations. 
    167174 
     
    172179 
    173180    def relationship(self, required_type, head, tail): 
    174         """ Find an existing relationship in the model that meets the 
     181        """ 
     182        Find an existing relationship in the model that meets the 
    175183        required type and is connected to the same model element the head 
    176184        and tail of the line are conncted to. 
     
    224232 
    225233    def relationship_or_new(self, type, head, tail): 
    226         """Like relation(), but create a new instance of none was found. 
     234        """ 
     235        Like relation(), but create a new instance of none was found. 
    227236        """ 
    228237        relation = self.relationship(type, head, tail) 
     
    253262 
    254263    def disconnect(self, handle): 
    255         """Disconnect model element. 
     264        """ 
     265        Disconnect model element. 
    256266        """ 
    257267        opposite = self.line.opposite(handle) 
     
    266276 
    267277class DependencyConnect(RelationshipConnect): 
    268     """Connect two NamedItem elements using a Dependency 
     278    """ 
     279    Connect two NamedItem elements using a Dependency 
    269280    """ 
    270281    component.adapts(items.NamedItem, items.DependencyItem) 
    271282 
    272283    def glue(self, handle, x, y): 
    273         """In addition to the normal check, both line ends may not be connected 
     284        """ 
     285        In addition to the normal check, both line ends may not be connected 
    274286        to the same element. Same goes for subjects. 
    275287        """ 
     
    309321 
    310322class ImplementationConnect(RelationshipConnect): 
    311     """Connect Interface and a BehavioredClassifier using an Implementation 
     323    """ 
     324    Connect Interface and a BehavioredClassifier using an Implementation 
    312325    """ 
    313326    component.adapts(items.NamedItem, items.ImplementationItem) 
    314327 
    315328    def glue(self, handle, x, y): 
    316         """In addition to the normal check, both line ends may not be connected 
     329        """ 
     330        In addition to the normal check, both line ends may not be connected 
    317331        to the same element. Same goes for subjects. 
    318332        """ 
     
    348362 
    349363class GeneralizationConnect(RelationshipConnect): 
    350     """Connect Classifiers with a Generalization relationship. 
     364    """ 
     365    Connect Classifiers with a Generalization relationship. 
    351366    """ 
    352367    component.adapts(items.ClassifierItem, items.GeneralizationItem) 
     
    379394 
    380395class IncludeConnect(RelationshipConnect): 
    381     """Connect Usecases with a Include relationship. 
     396    """ 
     397    Connect Usecases with a Include relationship. 
    382398    """ 
    383399    component.adapts(items.UseCaseItem, items.IncludeItem) 
    384400 
    385401    def glue(self, handle, x, y): 
    386         """In addition to the normal check, both line ends may not be connected 
     402        """ 
     403        In addition to the normal check, both line ends may not be connected 
    387404        to the same element. Same goes for subjects. 
    388405        """ 
     
    408425 
    409426class ExtendConnect(RelationshipConnect): 
    410     """Connect Usecases with a Extend relationship. 
     427    """ 
     428    Connect Usecases with a Extend relationship. 
    411429    """ 
    412430    component.adapts(items.UseCaseItem, items.ExtendItem) 
    413431 
    414432    def glue(self, handle, x, y): 
    415         """In addition to the normal check, both line ends may not be connected 
     433        """ 
     434        In addition to the normal check, both line ends may not be connected 
    416435        to the same element. Same goes for subjects. 
    417436        """ 
     
    437456 
    438457class ExtensionConnect(RelationshipConnect): 
    439     """Connect Class and a Stereotype using an Extension 
     458    """ 
     459    Connect Class and a Stereotype using an Extension 
    440460    """ 
    441461    component.adapts(items.ClassifierItem, items.ExtensionItem) 
    442462 
    443463    def glue(self, handle, x, y): 
    444         """In addition to the normal check, both line ends may not be connected 
     464        """ 
     465        In addition to the normal check, both line ends may not be connected 
    445466        to the same element. Same goes for subjects. 
    446467        """ 
     
    521542 
    522543    def disconnect(self, handle): 
    523         """Disconnect model element. 
     544        """ 
     545        Disconnect model element. 
    524546        Disconnect property (memberEnd) too, in case of end of life for 
    525547        Extension 
     
    541563 
    542564class AssociationConnect(RelationshipConnect): 
    543     """Connect Class and a Stereotype using an Extension 
     565    """ 
     566    Connect Class and a Stereotype using an Extension 
    544567    """ 
    545568    component.adapts(items.ClassifierItem, items.AssociationItem) 
    546569 
    547570    def glue(self, handle, x, y): 
    548         """In addition to the normal check, both line ends may not be connected 
     571        """ 
     572        In addition to the normal check, both line ends may not be connected 
    549573        to the same element. Same goes for subjects. 
    550574        """ 
     
    622646 
    623647    def disconnect(self, handle): 
    624         """Disconnect model element. 
     648        """ 
     649        Disconnect model element. 
    625650        Disconnect property (memberEnd) too, in case of end of life for 
    626651        Extension