Community
Participate
Working Groups
We need the possibility to run the XtextBuilder in a headless environment, just like in the JDT using the aptBuild application. This has far reaching consequences as it means moving some bindings from the UI plugin to the runtime plugin and probably introduce a third module to support headless mode (in addition to standalone and UI mode).
Please elaborate on your findings. What do you think needs to be done, which findings have to be moved?
Hi Sven, I have not yet studied this in detail. The first thing that comes to mind is the EMF resource factory extension. This in turn requires a Guice extension factory in the runtime plugin and thus probably also hierarchical Guice injectors. I will try to take a look at this next week. What is your gut feeling on this?
We've already discussed the matter of moving the resource factory before. See bug 264578.
my gut feeling is, that it should be possible to use the builder in a headless mode. But I hope we can find a solution without re-architecting the bundles.
I just successfully ran a headless build. All I had to do was change all the "org.eclipse.xtext.extension_resourceServiceProvider" extensions to use the "org.eclipse.xtext.resource.IResourceServiceProvider" implementation (instead of "org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"). The reason is that DefaultResourceUIServiceProvider has @LanguageSpecific IURIEditorOpener injected, which in turn has IWorkbench injected. Also I had to bind IWorkspace to a dummy implementation, as it is used in org.eclipse.xtext.ui.shared.internal.Activator. Also IWorkbench requires a binding to a dummy implementation, as it is used by EMFBasedPersister.
see https://github.com/eclipse/xtext-eclipse/issues/311 as well