• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# UmlToolingFramework.UML类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: getAttributes

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


示例17: getDiagrams

 /// <summary>
 /// get all using diagrams for the given element 
 /// currently only used for operations
 /// </summary>
 /// <param name="parentElement">the element</param>
 /// <returns>the diagrams using the given element</returns>
 private List<UML.UMLItem> getDiagrams(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.getUsingDiagrams<UML.Diagrams.Diagram>());
     }
     return elementsToNavigate;
 }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:17,代码来源:EAAddin.cs


示例18: getOperation

   /// <summary>
   /// gets the operation for the parent element which can be
   /// - an operation itself
   /// - a message calling the operation
   /// - a parameter for an operation
   /// - a CallOperationAction
   /// </summary>
   /// <param name="parentElement">the element to get the operation from</param>
   /// <returns>the operation for this parent element</returns>
   private List<UML.UMLItem> getOperation(UML.UMLItem parentElement)
   {
   	   List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
   	   UML.Classes.Kernel.Operation calledOperation = null;
   	   if (parentElement is UML.Classes.Kernel.Parameter)
   	   {
   	   		calledOperation = ((UML.Classes.Kernel.Parameter)parentElement).operation;
   	   }
   	   else if (parentElement is UML.Actions.BasicActions.CallOperationAction)
   	   {
   	   		calledOperation = ((UML.Actions.BasicActions.CallOperationAction)parentElement).operation;
   	   }
   	   else
   	   {
   	   		calledOperation = this.getSelectedOperation(parentElement);
   	   }
	   if (null != calledOperation)
	   {
	   		elementsToNavigate.Add(calledOperation);
	   }
	   return elementsToNavigate;
   }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:31,代码来源:EAAddin.cs


示例19: getCompositeDiagram

	private List<UML.UMLItem> getCompositeDiagram(UML.UMLItem parentElement)
	{
		List<UML.UMLItem> elementsToNavigate = new List<UML.UMLItem>();
   		UML.Classes.Kernel.Element selectedElement = parentElement as UML.Classes.Kernel.Element;
   		if (selectedElement != null)
   		{
   			UML.Diagrams.Diagram compositediagram = selectedElement.compositeDiagram;
   			if (compositediagram != null)
   			{
   				elementsToNavigate.Add(compositediagram);
   			}
   		}
   		return elementsToNavigate;
	}
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:14,代码来源:EAAddin.cs


示例20: getTaggedValueMenuItems

 /// <summary>
 /// creates a list of menuoptions based on the names of tagged values that reference another UML item
 /// </summary>
 /// <param name="ownerElement">the owner of the tagged values</param>
 /// <returns>menuoptions for tagged values</returns>
 private static List<string> getTaggedValueMenuItems(UML.Classes.Kernel.Element ownerElement)
 {
 	List<string> menuItems = new List<string>();
 	foreach (UML.Profiles.TaggedValue taggedValue in ownerElement.taggedValues) 
 	{
 		if (taggedValue.tagValue is UML.UMLItem)
 		{
 			string menuName = taggedValueMenuName(taggedValue.name);
 			//we don't want the "system" tagged values ea_guid and operation_guid to show up in the navigator
 			if(menuName != taggedValueMenuName(eaGUIDTagname)
 			   && menuName != taggedValueMenuName(eaOperationGUIDTagName)
 			   && !menuItems.Contains(menuName))
 			{
 				menuItems.Add(menuName);
 			}
 		}
 	}
 	return menuItems;
 }
开发者ID:Helmut-Ortmann,项目名称:Enterprise-Architect-Toolpack,代码行数:24,代码来源:EAAddin.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TSqlObject类代码示例发布时间:2022-05-24
下一篇:
C# TReportActionEnum类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap