Content assist in embedded editor [message #1698291] |
Fri, 12 June 2015 18:32  |
Eclipse User |
|
|
|
Hi guys,
I am migrating my application to use embedded editors but I am having some issues with the content assist for a reason which I do not able to figure out yet, the embedded editor generates different content assist context for the same grammar.
Do you have any idea about this? Possible reason or entry point to start my debugging?
Thanks in advance.
Regards,
Luis
[Updated on: Fri, 12 June 2015 18:33] by Moderator
|
|
|
|
|
Re: Content assist in embedded editor [message #1698424 is a reply to message #1698366] |
Mon, 15 June 2015 09:56  |
Eclipse User |
|
|
|
Hi Sebastian,
Thanks for your answer , I was trying to use the childInjector but it does not work either.
At the beginning I had the binding in my UiModule and then execute
Injector injector = MyDSLExtendedActivator.getInstance().getInjector(MyDSLActivator.COM_MYDSL_PLUGIN_ID);
injector = injector.createChildInjector(new MessageTransformerModule(metadataProvider));
but using this code I got the exception "binding is already define"
So I removed the bind from my UiModule in this case I got a different exception because my proposal provider had
@Inject
private IMetaDataProvider dataSenseProvider;
In the first line when guide try to build the injector this fail because there is no bind for IMetaDataProvider, to solve this I used @Inject(optional=true)
After doing these two changes the code run without exception however the injector is not setting my metadata provider
I debugged the constructor of my proposal provider and I checked the members injector attribute and the inject was not created for my field then I tried to inject something different for instance
@Inject
protected IPreferenceStoreAccess preferenceStoreAccess;
That works ok , so I think that my bind in the child injector cannot be used for the parent.
this is the code in my module
public class MessageTransformerModule implements Module {
private IMetaDataProvider metaDataProvider;
public MessageTransformerModule(IMetaDataProvider metaDataProvider) {
super();
this.metaDataProvider = metaDataProvider;
}
@Override
public void configure(Binder binder) {
binder.bind(IMetaDataProvider.class).toInstance(metaDataProvider);
}
}
Best regards,
Luis
|
|
|
Powered by
FUDForum. Page generated in 0.03114 seconds