Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Writing the contents of xtext editor to some other view(Writing the contents of xtext editor to some other view)
icon5.gif  Writing the contents of xtext editor to some other view [message #1225638] Mon, 30 December 2013 11:06 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi all,
I am actually writing some of the content from my xtext editor to a created view by me.
I have added a selection listener and getting the editor contents from IWorkbenchPart.

I am doing some modifications on the objects that I have received from editor in a method doModification() and then trying to put it to the created view.

Here while modifying the objects I get NullPointerException because some scope provider and IQualifiedNameConverter are NULL. Which tells me that some injection has not happened properly. Can anyone tell me how do I do it here?

Note: I am calling this method i.e. doModification() from my generator also and there everything works fine!!!.

When Generator is called this injection will happen and while writing JUnit test cases I do this injection through @InjectWith(value = MyDSLInjectorProvider.class).

But how do I do it here?

Thanks in advance Smile


Arshad
Re: Writing the contents of xtext editor to some other view [message #1225650 is a reply to message #1225638] Mon, 30 December 2013 11:43 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13499
Registered: July 2009
Senior Member
http://koehnlein.blogspot.de/2012/11/xtext-tip-how-do-i-get-guice-injector.html

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to handle overloaded methods with Custome xbase scope provider
Next Topic:Generation of model files with Maven
Goto Forum:
  


Current Time: Tue Jul 14 12:36:41 GMT 2020

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

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

Back to the top