Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:02 Go to next message
Syed Samsul Arefin is currently offline Syed Samsul ArefinFriend
Messages: 17
Registered: May 2016
Junior Member
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 19:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31909
Registered: July 2009
Senior Member
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?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
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: Sat Jun 19 16:56:52 GMT 2021

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

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

Back to the top