Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext - creating a new EObject(xtext - creating a new EObject)
xtext - creating a new EObject [message #989320] Wed, 05 December 2012 16:03 Go to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
Hi,

I want to create a new EObject, but by default the constructor is protected. Is there a way to over come that and creating a new instance of EObject?


the purpose is to create a EObject by jackson json tree
thanks,

[Updated on: Wed, 05 December 2012 16:05]

Report message to a moderator

Re: xtext - creating a new EObject [message #989324 is a reply to message #989320] Wed, 05 December 2012 16:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Ask yourdslfactory for an instance of the factory and call the
create... Methods

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext - creating a new EObject [message #989423 is a reply to message #989324] Thu, 06 December 2012 07:58 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
could you please give me an example as i'm not quite sure i understand?
Re: xtext - creating a new EObject [message #989426 is a reply to message #989423] Thu, 06 December 2012 08:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
???? i mean: MyDslFactory.eINSTANCE.createGreeting()

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext - creating a new EObject [message #989529 is a reply to message #989426] Thu, 06 December 2012 16:16 Go to previous messageGo to next message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
thanks.

i needed:
EcoreFactory.eINSTANCE.createEObject()

thanks for your help Smile
Re: xtext - creating a new EObject [message #989547 is a reply to message #989426] Thu, 06 December 2012 17:01 Go to previous message
Dana Klein is currently offline Dana KleinFriend
Messages: 63
Registered: October 2012
Member
No Message Body

[Updated on: Thu, 06 December 2012 17:02]

Report message to a moderator

Previous Topic:GlobalScope Import
Next Topic:Reusing validation in GMF editor
Goto Forum:
  


Current Time: Thu Apr 25 15:27:19 GMT 2024

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

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

Back to the top