Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Creating EInt, EString, EDouble programmatically in Java
Creating EInt, EString, EDouble programmatically in Java [message #964060] Tue, 30 October 2012 08:22 Go to next message
Peter Johnsen is currently offline Peter Johnsen
Messages: 52
Registered: January 2012
Member
Hi,

There is probably a pretty simple answer to this, though I could not find the answer anywhere. My question is: how can I programmatically create, e.g. an EInt:

EAttribute a = ...
a.setEType( ??? )

I hope someone knows this! Smile
Re: Creating EInt, EString, EDouble programmatically in Java [message #964116 is a reply to message #964060] Tue, 30 October 2012 09:10 Go to previous messageGo to next message
Tim Schaefer is currently offline Tim Schaefer
Messages: 49
Registered: June 2011
Location: Marburg, Germany
Member
Hi Peter,

like this:

EAttribute a = EcoreFactory.eINSTANCE.createEAttribute();
a.setEType(EcorePackage.Literals.EINT);

Regards,
Tim
Re: Creating EInt, EString, EDouble programmatically in Java [message #964182 is a reply to message #964116] Tue, 30 October 2012 10:21 Go to previous message
Peter Johnsen is currently offline Peter Johnsen
Messages: 52
Registered: January 2012
Member
Tim Schaefer wrote on Tue, 30 October 2012 05:10
Hi Peter,

like this:

EAttribute a = EcoreFactory.eINSTANCE.createEAttribute();
a.setEType(EcorePackage.Literals.EINT);

Regards,
Tim


Excellent! Many thanks to you Sir!
Previous Topic:CDO Regeneration and member fields
Next Topic:EMF saving resources problem
Goto Forum:
  


Current Time: Fri Oct 24 11:33:30 GMT 2014

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

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