use of org.eclipse.xtext.resource.IResourceServiceProvider in project xtext-core by eclipse.
the class AbstractLanguageServerTest method setup.
@Before
@BeforeEach
public void setup() {
final Injector injector = Guice.createInjector(this.getServerModule());
injector.injectMembers(this);
final Object resourceServiceProvider = this.resourceServerProviderRegistry.getExtensionToFactoryMap().get(this.fileExtension);
if ((resourceServiceProvider instanceof IResourceServiceProvider)) {
this.languageInfo = ((IResourceServiceProvider) resourceServiceProvider).<LanguageInfo>get(LanguageInfo.class);
}
this.languageServer.connect(ServiceEndpoints.toServiceObject(this, this.getLanguageClientClass()));
this.languageServer.supportedMethods();
File _absoluteFile = new File("").getAbsoluteFile();
File _file = new File(_absoluteFile, AbstractLanguageServerTest.TEST_PROJECT_PATH);
this.root = _file;
}
use of org.eclipse.xtext.resource.IResourceServiceProvider in project xtext-core by eclipse.
the class RegionAccessTestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("regionaccesstestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("regionaccesstestlanguage", serviceProvider);
if (!EPackage.Registry.INSTANCE.containsKey("http://formatter2/regionaccesstestlanguage")) {
EPackage.Registry.INSTANCE.put("http://formatter2/regionaccesstestlanguage", RegionaccesstestlanguagePackage.eINSTANCE);
}
}
use of org.eclipse.xtext.resource.IResourceServiceProvider in project xtext-core by eclipse.
the class Bug301935ExTestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug301935extestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug301935extestlanguage", serviceProvider);
}
use of org.eclipse.xtext.resource.IResourceServiceProvider in project xtext-core by eclipse.
the class Bug299237TestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug299237testlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug299237testlanguage", serviceProvider);
if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/Bug299237TestLanguage")) {
EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/Bug299237TestLanguage", Bug299237TestPackage.eINSTANCE);
}
}
use of org.eclipse.xtext.resource.IResourceServiceProvider in project xtext-core by eclipse.
the class Bug301935TestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug301935testlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug301935testlanguage", serviceProvider);
if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/Bug301935TestLanguage")) {
EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/Bug301935TestLanguage", Bug301935TestPackage.eINSTANCE);
}
}
Aggregations