Changeset 2272

Show
Ignore:
Timestamp:
03/16/08 15:28:53 (2 months ago)
Author:
wrobe..@pld-linux.org
Message:

- navigation querying fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/trunk/gaphor/diagram/classes/association.py

    r2271 r2272  
    386386        Check navigability of the AssociationEnd. If property is owned by 
    387387        class via ownedAttribute, then it is navigable. If property is 
    388         owned by association by owndedEnd, then it is not navigable. 
     388        owned by association by ownedEnd, then it is not navigable. 
    389389        Otherwise the navigability is unknown. 
    390390 
     
    398398 
    399399        if subject and subject.opposite: 
     400            # 
     401            # WARNING! see bug http://gaphor.devjavu.com/ticket/110 
     402            # 
    400403            opposite = subject.opposite 
    401404            if isinstance(opposite.type, UML.Interface): 
    402405                type = subject.interface_ 
    403             else: # isinstance(opposite.type, UML.Class): 
     406            elif isinstance(opposite.type, UML.Class): 
    404407                type = subject.class_ 
     408            elif isinstance(opposite.type, UML.Actor): 
     409                type = subject.actor 
     410            elif isinstance(opposite.type, UML.UseCase): 
     411                type = subject.useCase 
     412            else: 
     413                assert 0, 'Should never be reached' 
    405414 
    406415            if type and subject in type.ownedAttribute: