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 11:03 Go to next message
Dana Klein is currently offline Dana Klein
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 11:05]

Report message to a moderator

Re: xtext - creating a new EObject [message #989324 is a reply to message #989320] Wed, 05 December 2012 11:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6241
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
Re: xtext - creating a new EObject [message #989423 is a reply to message #989324] Thu, 06 December 2012 02:58 Go to previous messageGo to next message
Dana Klein is currently offline Dana Klein
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 03:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6241
Registered: July 2009
Senior Member
???? i mean: MyDslFactory.eINSTANCE.createGreeting()
Re: xtext - creating a new EObject [message #989529 is a reply to message #989426] Thu, 06 December 2012 11:16 Go to previous messageGo to next message
Dana Klein is currently offline Dana Klein
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 12:01 Go to previous message
Dana Klein is currently offline Dana Klein
Messages: 63
Registered: October 2012
Member
No Message Body

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

Report message to a moderator

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


Current Time: Mon Sep 01 09:46:47 EDT 2014

Powered by FUDForum. Page generated in 0.02459 seconds