/** {@inheritDoc} */ @Override public Resource load(final ResourceSet resourceSet, final URI uri, final InputStream input) throws IOException { final Injector injector = IXtInjectorProvider.INSTANCE.getInjector(context.get(XpectJavaModel.class), uri); final Resource resource = injector.getInstance(IResourceFactory.class).createResource(uri); final Resource existingResousce = from(resourceSet.getResources()) .firstMatch(r -> r.getURI().equals(resource.getURI())).orNull(); if (null != existingResousce) { // remove the existing one resourceSet.getResources().remove(existingResousce); } resourceSet.getResources().add(resource); try { resource.load(input, null); } finally { if (input != null) input.close(); } return resource; }
protected String transformContent(IResourceFactory resourceFactory) { BufferedReader reader = new BufferedReader(new StringReader(content)); try { try { StringWriter writer = new StringWriter(content.length()); PrintWriter printer = new PrintWriter(writer); String line = reader.readLine(); while (line != null) { line = transfromLine(line, resourceFactory); printer.println(line); line = reader.readLine(); } printer.close(); return writer.toString(); } finally { reader.close(); } } catch (IOException e) { throw new RuntimeException(e); } }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.baernreuther.de/dsls/Pkmntcgo")) { EPackage.Registry.INSTANCE.put("http://www.baernreuther.de/dsls/Pkmntcgo", PkmntcgoPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ptcgo", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("ptcgo", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4ts", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4ts", serviceProvider); }
/** * Creates {@link N4JSResource} in new {@link ResourceSet}. Created resource has uri of processed xt file and its * context. During creation resource factory is obtained dynamically to preserve bindings created by XPECT (see * {@link org.eclipse.xpect.xtext.lib.tests.ValidationTestModuleSetup#configure}) * */ @Creates(ThisResource.class) public XtextResource createThisResource() throws IOException, CoreException { Entry<IFile, IProject> file2project = findTestResources(); IFile xpectFile = file2project.getKey(); IProject userProject = file2project.getValue(); ResourceSet resourceSet = resourceSetProvider.get(userProject); URI xpectFilePlatformURI = URI.createPlatformResourceURI(xpectFile.getFullPath().toString(), ENCODE_PLATFORM_RESOURCE_URIS); Injector injector = IXtInjectorProvider.INSTANCE.getInjector(ctx.get(XpectJavaModel.class), xpectFilePlatformURI); Resource resource = injector.getInstance(IResourceFactory.class).createResource(xpectFilePlatformURI); resourceSet.getResources().add(resource); InputStream input = xpectFile.getContents(); try { resource.load(input, null); } finally { if (input != null) input.close(); } return (XtextResource) resource; }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/n4js/regex/RegularExpression")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/n4js/regex/RegularExpression", RegularExpressionPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("regex", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("regex", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4js", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4js", serviceProvider); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsx", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsx", serviceProvider); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("js", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("js", serviceProvider); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("jsx", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("jsx", serviceProvider); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsd", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsd", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4mf", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4mf", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/example/mydsl/MyDsl")) { EPackage.Registry.INSTANCE.put("http://www.xtext.org/example/mydsl/MyDsl", MyDslPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mensa", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mensa", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.hribol.com/bromium/dsl/Bromium")) { EPackage.Registry.INSTANCE.put("http://www.hribol.com/bromium/dsl/Bromium", BromiumPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("brm", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("brm", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.gw4e/dsl/DSLPolicies")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.gw4e/dsl/DSLPolicies", DSLPoliciesPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("policies", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("policies", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.wamas.com/ide/launching/LcDsl")) { EPackage.Registry.INSTANCE.put("http://www.wamas.com/ide/launching/LcDsl", LcDslPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("lc", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("lc", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/gemoc/Dsl")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/gemoc/Dsl", DslPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("dsl", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("dsl", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/dsl/restaurante/Restaurante")) { EPackage.Registry.INSTANCE.put("http://www.xtext.org/dsl/restaurante/Restaurante", RestaurantePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("rest", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("rest", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("occi", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("occi", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/purexbase/PureXbase")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/purexbase/PureXbase", PureXbasePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xbase", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xbase", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("___xbase", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("___xbase", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug313089testlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug313089testlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/test/Bug313089TestLanguage")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/test/Bug313089TestLanguage", Bug313089Package.eINSTANCE); } }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2011/xtext/ui/common/types/xtext/ui/Refactoring")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2011/xtext/ui/common/types/xtext/ui/Refactoring", RefactoringTestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/xtext/ui/common/types/tests/ContentAssist")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/xtext/ui/common/types/tests/ContentAssist", ContentAssistTestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesAssistTest", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesAssistTest", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring1", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring1", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring2", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring2", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/builderStandaloneTestLanguage")) { EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/builderStandaloneTestLanguage", BuilderTestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("buildertestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("buildertestlanguage", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ignorecaseimportstestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("ignorecaseimportstestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/ignoreCaseImportsTestLanguage")) { EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/ignoreCaseImportsTestLanguage", IgnoreCaseImportsTestPackage.eINSTANCE); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("referencegrammartestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("referencegrammartestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/reference/ReferenceGrammar")) { EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/reference/ReferenceGrammar", ReferenceGrammarPackage.eINSTANCE); } }
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); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("multiruleenumtestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("multiruleenumtestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/MultiRuleEnums")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/MultiRuleEnums", MultiRuleenumsPackage.eINSTANCE); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("fowlerdsltestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fowlerdsltestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://example.xtext.org/FowlerDslTestLanguage")) { EPackage.Registry.INSTANCE.put("http://example.xtext.org/FowlerDslTestLanguage", FowlerdslPackage.eINSTANCE); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("enumrulestestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("enumrulestestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest", EnumRulesTestLanguagePackage.eINSTANCE); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("inheritancetest3language", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("inheritancetest3language", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/example/mydsl/MyDsl")) { EPackage.Registry.INSTANCE.put("http://www.xtext.org/example/mydsl/MyDsl", MyDslPackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("minitl", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("minitl", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext", serviceProvider); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext2", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext2", serviceProvider); }
@Override public void register(Injector injector) { EPackage.Registry.INSTANCE.put(XtextPackage.eINSTANCE.getNsURI(), XtextPackage.eINSTANCE); IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtexterror", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xtexterror", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("importuritestlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("importuritestlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/importUriTestLanguage")) { EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/importUriTestLanguage", ImportedURIPackage.eINSTANCE); } }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/ide/tests/testlanguage/IndentationAwareUiTestLanguage")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/IndentationAwareUiTestLanguage", IndentationAwareUiTestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationAwareUiTestLang", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationAwareUiTestLang", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/ide/tests/testlanguage/PartialContentAssistTestLanguage")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/PartialContentAssistTestLanguage", PartialContentAssistTestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("partialcontentassisttestlang", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("partialcontentassisttestlang", serviceProvider); }
public void register(Injector injector) { if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/ide/tests/testlanguage/TestLanguage")) { EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/TestLanguage", TestLanguagePackage.eINSTANCE); } IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("testlang", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("testlang", serviceProvider); }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug250313", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug250313", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://org.eclipse.xtext.valueconverter.Bug250313")) { EPackage.Registry.INSTANCE.put("http://org.eclipse.xtext.valueconverter.Bug250313", Bug250313Package.eINSTANCE); } }
public void register(Injector injector) { IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug289059testlanguage", resourceFactory); IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug289059testlanguage", serviceProvider); if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/Bug289059TestLanguage")) { EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/Bug289059TestLanguage", Bug289059TestPackage.eINSTANCE); } }