Skip to main content



      Home
Home » Modeling » EMF » How to specify the Type of an attribute programmatically?
How to specify the Type of an attribute programmatically? [message #1733786] Tue, 31 May 2016 15:02 Go to next message
Eclipse UserFriend
Maybe it's a trivial question. While creating the attribute programmatically how do I specify the Type of the attribute?

Package model = UMLFactory.eINSTANCE.createPackage();
		model.setName("MyPackage");
		Class cls = model.createOwnedClass("MyClass", false);
		Property p =cls.createOwnedAttribute("Attr1","???");


Any suggestion?
Re: How to specify the Type of an attribute programmatically? [message #1733787 is a reply to message #1733786] Tue, 31 May 2016 15:20 Go to previous message
Eclipse UserFriend
Please use the eclipse.modeling.mdt.uml2 forum for UML questions.


On 31.05.2016 21:02, Syed Samsul Arefin wrote:
> Maybe it's a trivial question. While creating the attribute
> programmatically how do I specify the Type of the attribute?
>
> Package model = UMLFactory.eINSTANCE.createPackage();
> model.setName("MyPackage");
> Class cls = model.createOwnedClass("MyClass", false);
> Property p =cls.createOwnedAttribute("Attr1","???");
>
> Any suggestion?
>
Previous Topic:Running QVTo in a standalone JAVA project
Next Topic:[Papyrus, CDO] Deadlock situation when same model is loaded in different CDOViews
Goto Forum:
  


Current Time: Wed Jul 16 22:38:58 EDT 2025

Powered by FUDForum. Page generated in 0.07579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top