当前位置: 首页>>代码示例>>C#>>正文


C# UmlToolingFramework.UML类代码示例

本文整理汇总了C#中TSF.UmlToolingFramework.UML的典型用法代码示例。如果您正苦于以下问题:C# TSF.UmlToolingFramework.UML类的具体用法?C# TSF.UmlToolingFramework.UML怎么用?C# TSF.UmlToolingFramework.UML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TSF.UmlToolingFramework.UML类属于命名空间,在下文中一共展示了TSF.UmlToolingFramework.UML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: addFactory

 private static void addFactory(UML.Extended.UMLModel model, SchemaBuilderFactory factory)
 {
     if (!instances.ContainsKey(model))
       {
       instances.Add(model, factory);
       }
 }
开发者ID:GeertBellekens,项目名称:UML-Tooling-Framework,代码行数:7,代码来源:SchemaBuilderFactory.cs

示例2: createSubsetModel

		/// <summary>
		/// creates a subset of the source model with only the properties and associations used in this schema
		/// </summary>
		/// <param name="destinationPackage">the package to create the subset in</param>
		public void createSubsetModel(UML.Classes.Kernel.Package destinationPackage)
		{
			//loop the elemets to create the subSetElements
			foreach (EASchemaElement schemaElement in this.elements) 
			{
				//only create subset elements for classes, not for datatypes
				if (schemaElement.sourceElement is UML.Classes.Kernel.Class)
				{
					schemaElement.createSubsetElement(destinationPackage);
					//Logger.log("after EASchema::creating single subset element");
				}
			}
			//Logger.log("after EASchema::creating subsetelements");
			// then loop them again to create the associations
			foreach (EASchemaElement schemaElement in this.elements) 
			{
				//only create subset elements for classes, not for datatypes
				if (schemaElement.sourceElement is UML.Classes.Kernel.Class)
				{
					schemaElement.createSubsetAssociations();
					//Logger.log("after EASchema::creating single subset association");
				}
				// and to resolve the attributes types to subset types if required
				schemaElement.resolveAttributetypes(this.schemaElements);
				//Logger.log("after EASchema::resolving attributes");
				//and add a dependency from the schemaElement to the type of the attributes
				schemaElement.addAttributeTypeDependencies();
				//Logger.log("after EASchema::adding attribuetypeDependencies");
			}

		}
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:35,代码来源:EASchema.cs

示例3: getInstance

		/// returns the singleton instance for the given model.
	    public static new EASchemaBuilderFactory getInstance(UML.UMLModel model){
	      EASchemaBuilderFactory factory = SBF.SchemaBuilderFactory.getInstance(model) as EASchemaBuilderFactory;
	      if( factory == null ) {
	      	factory = new EASchemaBuilderFactory((UTF_EA.Model)model);
	      }
	      return factory;
	    }
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:8,代码来源:EASchemaBuilderFactory.cs

示例4: getVisibility

 getVisibility(UML.Classes.Kernel.VisibilityKind visibility) {
   switch( visibility ) {
     case UML.Classes.Kernel.VisibilityKind._private:   return "private";
     case UML.Classes.Kernel.VisibilityKind._protected: return "protected";
     case UML.Classes.Kernel.VisibilityKind._package:   return "package";
     case UML.Classes.Kernel.VisibilityKind._public:    return "public";
     default:                                           return "public";
   }
 }
开发者ID:ceena,项目名称:UmlCanvas,代码行数:9,代码来源:Visibility.cs

示例5: switch

 public static int getEAAggregationKind
   (UML.Classes.Kernel.AggregationKind aggregation)
 {
   switch(aggregation) {
     case UML.Classes.Kernel.AggregationKind.none:      return 0;
     case UML.Classes.Kernel.AggregationKind.shared:    return 1;
     case UML.Classes.Kernel.AggregationKind.composite: return 2;
     default:                                           return 0;
   }
 }
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:10,代码来源:AggregationKind.cs

示例6: switch

 /// translates the UML VisibilityKind to the string used in EA
 internal static String getEAVisibility
   (UML.Classes.Kernel.VisibilityKind visibility)
 {
   switch (visibility) {
     case UML.Classes.Kernel.VisibilityKind._private:   return "Private";
     case UML.Classes.Kernel.VisibilityKind._public:    return "Public";
     case UML.Classes.Kernel.VisibilityKind._protected: return "Protected";
     case UML.Classes.Kernel.VisibilityKind._package:   return "Package";
     default:                                           return "";
   }
 }
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:12,代码来源:VisibilityKind.cs

示例7: switch

 internal static string getEAParameterDirectionKind
   ( UML.Classes.Kernel.ParameterDirectionKind UMLdirection )
 {
   switch (UMLdirection) {
   case UML.Classes.Kernel.ParameterDirectionKind._in:     return "in";
   case UML.Classes.Kernel.ParameterDirectionKind._out:    return "out";
   case UML.Classes.Kernel.ParameterDirectionKind._inout:  return "inout";
   case UML.Classes.Kernel.ParameterDirectionKind._return: return "return";
   default:                                                return "in";
   }
 }
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:11,代码来源:ParameterDirectionKind.cs

示例8: getSchemaElementForUMLElement

		/// <summary>
		/// returns the SchemaElement that corresponds with the given UML element
		/// </summary>
		/// <param name="umlElement">the source UMLElement</param>
		/// <returns></returns>
		internal EASchemaElement getSchemaElementForUMLElement(UML.Classes.Kernel.Element umlElement)
		{
			EASchemaElement result = null;
			foreach (EASchemaElement schemaElement in this.elements) 
			{
				if (schemaElement.sourceElement.Equals(umlElement))
				{
					result = schemaElement;
				}
			}
			return result;
		}
开发者ID:kimballjohnson,项目名称:Enterprise-Architect-Add-in-Framework,代码行数:17,代码来源:EASchema.cs

示例9: NavigatorList

 	/// <summary>
 	/// createas a new navigatorList based on the given list of UML Items
 	/// </summary>
 	/// <param name="items">the items to show</param>
 	public NavigatorList(List<UML.UMLItem> items, UML.UMLItem context):base()
     {
 		if (items.Count > 0)
 		{
 			this.context = context;
 			if (items[0] is UML.Diagrams.Diagram)
 			{
 				this.InitDiagrams(items.Cast<UML.Diagrams.Diagram>().ToList());
 			}
 			else
 			{
 				this.InitNamedElements(items);
 			}
 		}
 			
     }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:20,代码来源:NavigatorList.cs

示例10: foreach

 /// <summary>
 /// returns all tagged values that reference the given item
 /// </summary>
 /// <param name="parentItem"></param>
 /// <returns></returns>
 private List<UML.Extended.UMLItem>getDependentTaggedValues(UML.Extended.UMLItem parentItem)
 {
     List<UML.Extended.UMLItem> elementsToNavigate = new List<UML.Extended.UMLItem>();
     UML.Classes.Kernel.Element parentElement = parentItem as UML.Classes.Kernel.Element;
     if (parentElement != null)
     {
     foreach (UML.Profiles.TaggedValue taggedValue in parentElement.getReferencingTaggedValues())
     {
         //not for the "system" tagged values
         if (taggedValue.name != eaGUIDTagname
            && taggedValue.name != eaOperationGUIDTagName)
         {
             elementsToNavigate.Add(taggedValue);
         }
     }
     }
     return elementsToNavigate;
 }
开发者ID:GeertBellekens,项目名称:Enterprise-Architect-Toolpack,代码行数:23,代码来源:EAAddin.cs

示例11: getImplementation

   /// <summary>
   /// selects the implementation of the operation in the project browser, and opens all owned diagrams of the implementation.
   /// </summary>
   private List<UML.UMLItem> getImplementation(UML.UMLItem parentElement)
   {
   	List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
   	UML.Classes.Kernel.Operation selectedOperation = this.getSelectedOperation(parentElement);
   	if (selectedOperation != null )
   	{
   		foreach ( UML.CommonBehaviors.BasicBehaviors.Behavior implementation in selectedOperation.methods)
   		{
   			//select the behavior in the project browser
	   		elementsToNavigate.AddRange(implementation.ownedDiagrams);
   		}
   	}
   	return elementsToNavigate;
   }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:17,代码来源:EAAddin.cs

示例12: getClassifier

 /// <summary>
 /// Opens the type of the attribute
 /// </summary>
 private List<UML.UMLItem> getClassifier(UML.UMLItem parentElement)
 {
 		List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
 		UML.Classes.Kernel.Property selectedAttribute = parentElement as UML.Classes.Kernel.Property;
 		if (null != selectedAttribute)
 		{
 			elementsToNavigate.Add(selectedAttribute.type);
 		}
 		return elementsToNavigate;
 }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:13,代码来源:EAAddin.cs

示例13: getParameters

   /// <summary>
   /// Opens the parameters that use the selected element as type
   /// </summary>
   private List<UML.UMLItem> getParameters(UML.UMLItem parentElement)
   {
	   	List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
	   	UML.Classes.Kernel.Type selectedType = parentElement as UML.Classes.Kernel.Type;
	   	// get the parameters that use the selected classifier as type
	   	elementsToNavigate.AddRange(selectedType.getDependentTypedElements<UML.Classes.Kernel.Parameter>());
	   	return elementsToNavigate;
   }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:11,代码来源:EAAddin.cs

示例14: getActions

   /// <summary>
   /// opens the CallOperationActions that call te selected operation
   /// </summary>
   private List<UML.UMLItem> getActions(UML.UMLItem parentElement)
   {
   	List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
   	UML.Classes.Kernel.Operation selectedOperation = this.getSelectedOperation( parentElement);
   	if( selectedOperation != null)
   	{
		elementsToNavigate.AddRange(selectedOperation.getDependentCallOperationActions());
    }
	return elementsToNavigate;
   }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:13,代码来源:EAAddin.cs

示例15: getParameterTypes

   /// <summary>
   /// Opens the types of the parameters of the selected operation
   /// </summary>
   private List<UML.UMLItem> getParameterTypes(UML.UMLItem parentElement)
   {
   		List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
	   	UML.Classes.Kernel.Operation selectedOperation = this.getSelectedOperation(parentElement);
        if (selectedOperation != null)
        {
            HashSet<UML.Classes.Kernel.Parameter> parameters = selectedOperation.ownedParameters;
            foreach (UML.Classes.Kernel.Parameter parameter in parameters)
            {
                elementsToNavigate.Add(parameter.type);
            }
        }
	   	return elementsToNavigate;
   }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:17,代码来源:EAAddin.cs


注:本文中的TSF.UmlToolingFramework.UML类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。