Inject not working with non xtext plugin [message #1698501] |
Tue, 16 June 2015 06:47 |
Girish Kumar Messages: 48 Registered: May 2011 |
Member |
|
|
Hi All,
I have DSL plugin, i have generated artifacts and works perfectly fine.
the plugins are as below
a.dsl
a.dsl.test
a.dsl.ui
@Inject works fine within this three plugins.
I have another plugin say b.ui depends on a.dsl and a.dsl.ui
b.ui has a multipage editor and add xtext editor has one of the page
I want to inject some data in some class of b.ui
how can this be done ?
Regards
Girish
[Updated on: Tue, 16 June 2015 06:51] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Inject not working with non xtext plugin [message #1698537 is a reply to message #1698534] |
Tue, 16 June 2015 09:53 |
Girish Kumar Messages: 48 Registered: May 2011 |
Member |
|
|
Ok I have 3 plugins which is generated by Xtext that is dsl, dsl.ui, dsl.tests.
I have one more plugin which depends on dsl, dsl.ui, lets name it as someplugin
In someplugin , i have a class named SomeClass, which needs formatter,generator, etc
so i do this
SomeClass some = new SomeClass();
[DSL]Activator.getInstance().getInjector("").injectMembers(some);
//now formatter and generator which has @inject is set
my question, is there a way i can say injectMembers to all Instances of SomeClass which will be created in future so that i don't have to call [DSL]Activator.getInstance().getInjector("").injectMembers(some); everytime the object created.
[Updated on: Tue, 16 June 2015 09:54] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04030 seconds