コード例 #1
0
 public void ShowOwnedOperationsFor(UML.Classifier element)
 {
     _owner = element;
     // sets a global reference to the collection
     UML.Class ownerClass;
     UML.DataType ownerDatatype;
     UML.Interface ownerInterface;
     if((ownerClass = _owner as UML.Class) != null)
     {
         _ownedOperations = ownerClass.OwnedOperation;
     }
     else if((ownerDatatype = _owner as UML.DataType) != null)
     {
         _ownedOperations = ownerDatatype.OwnedOperation;
     }
     else if((ownerInterface = _owner as UML.Interface) != null)
     {
         _ownedOperations = ownerInterface.OwnedOperation;
     }
     // shows the collection items
     string[] operationList = new string[_ownedOperations.Count];
     UML.Operation prop;
     for(int i = 0; i < _ownedOperations.Count; i ++)
     {
         prop = (UML.Operation)_ownedOperations[i];
         operationList[i] = prop.Name;
     }
     base.ShowList(operationList);
 }
コード例 #2
0
 public void ShowGeneralizationsFor(UML.Classifier element)
 {
     _owner = element;
     string[] propertyList = new string[element.Generalization.Count];
     UML.NamedElement ne;
     UML.Generalization current;
     string label;
     for(int i = 0; i < element.Generalization.Count; i ++)
     {
         current = (UML.Generalization)element.Generalization[i];
         ne = current.General;
         label = (ne!=null ? ne.Name : null);
         if(label == null || label == "")
         {
             label = GettextCatalog.GetString ("<<anonymous Generalization>>");
         }
         propertyList[i] = label;
     }
     base.ShowList(propertyList);
 }
コード例 #3
0
 public void ShowOwnedAttributesFor(UML.Classifier element)
 {
     _owner = element;
     // sets a global reference to the collection
     UML.Association ownerAssociation;
     UML.Class ownerClass;
     UML.DataType ownerDatatype;
     UML.Interface ownerInterface;
     if((ownerAssociation = _owner as UML.Association) != null)
     {
         _ownedAttributes = ownerAssociation.OwnedEnd;
     }
     else if((ownerClass = _owner as UML.Class) != null)
     {
         _ownedAttributes = ownerClass.OwnedAttribute;
     }
     else if((ownerDatatype = _owner as UML.DataType) != null)
     {
         _ownedAttributes = ownerDatatype.OwnedAttribute;
     }
     else if((ownerInterface = _owner as UML.Interface) != null)
     {
         _ownedAttributes = ownerInterface.OwnedAttribute;
     }
     // shows the collection items
     string[] propertyList = new string[_ownedAttributes.Count];
     UML.Property prop;
     string propName;
     for(int i = 0; i < _ownedAttributes.Count; i ++)
     {
         prop = (UML.Property)_ownedAttributes[i];
         propName = prop.Name;
         if (propName == null || propName == "")
         {
             propName = "<<"+GettextCatalog.GetString ("anonymous")+ prop.GetType().Name.Substring(6) + ">>";
         }
         propertyList[i] = propName;
     }
     base.ShowList(propertyList);
 }
コード例 #4
0
 // When the widgets is hidden, it must release all the references to
 // the model objects.
 public new void Hide()
 {
     _ownedAttributes = null;
     _owner = null;
     base.Hide();
 }
コード例 #5
0
 // When the widgets is hidden, it must release all the references to
 // the model objects.
 public new void Hide()
 {
     _owner = null;
     base.Hide();
 }
コード例 #6
0
ファイル: UMLClassifier.cs プロジェクト: MonoBrasil/historico
 public UMLClassifier(UMLDiagram ownerDiagram, DI.GraphNode graphNode)
     : base(ownerDiagram, graphNode)
 {
     _modelElement = (UML.Classifier)base._modelElement;
     _name.FontModifier = (_modelElement.IsAbstract ? "italic" : "");
 }