Search in sources :

Example 1 with IWorkspaceConfigFactory

use of org.eclipse.xtext.ide.server.IWorkspaceConfigFactory in project xtext-core by eclipse.

the class MultiProjectTest method setup.

@Before
public void setup() {
    ServerModule _serverModule = new ServerModule();
    final Injector injector = Guice.createInjector(Modules2.mixin(_serverModule, new AbstractModule() {

        @Override
        protected void configure() {
            this.<IWorkspaceConfigFactory>bind(IWorkspaceConfigFactory.class).to(MultiProjectWorkspaceConfigFactory.class);
        }
    }));
    injector.injectMembers(this);
    final File workspaceRoot = this.getRoot("test-data");
    File _file = new File(workspaceRoot, "test-project0");
    this.project0 = _file;
    File _file_1 = new File(workspaceRoot, "test-project1");
    this.project1 = _file_1;
    this.project0.mkdir();
    this.project1.mkdir();
    final Procedure2<URI, Iterable<Issue>> _function = (URI $0, Iterable<Issue> $1) -> {
        this.diagnostics.put($0, IterableExtensions.<Issue>toList($1));
    };
    this.workspaceManager.initialize(URI.createFileURI(workspaceRoot.getAbsolutePath()), _function, null);
}
Also used : Issue(org.eclipse.xtext.validation.Issue) Injector(com.google.inject.Injector) File(java.io.File) URI(org.eclipse.emf.common.util.URI) IWorkspaceConfigFactory(org.eclipse.xtext.ide.server.IWorkspaceConfigFactory) ServerModule(org.eclipse.xtext.ide.server.ServerModule) AbstractModule(com.google.inject.AbstractModule) Before(org.junit.Before)

Aggregations

AbstractModule (com.google.inject.AbstractModule)1 Injector (com.google.inject.Injector)1 File (java.io.File)1 URI (org.eclipse.emf.common.util.URI)1 IWorkspaceConfigFactory (org.eclipse.xtext.ide.server.IWorkspaceConfigFactory)1 ServerModule (org.eclipse.xtext.ide.server.ServerModule)1 Issue (org.eclipse.xtext.validation.Issue)1 Before (org.junit.Before)1