Java 类org.eclipse.xtext.resource.IResourceFactory 实例源码

项目:n4js    文件:DuplicateResourceAwareFileSetupContext.java   
/** {@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;
}
项目:xtext-core    文件:UnorderedGroupsSplitter.java   
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);
    }
}
项目:pokemon-tcgo-deck-generator    文件:PkmntcgoStandaloneSetupGenerated.java   
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);
}
项目:n4js    文件:TypesStandaloneSetupGenerated.java   
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);
}
项目:n4js    文件:N4IDEXpectFileSetup.java   
/**
 * 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;
}
项目:n4js    文件:RegularExpressionStandaloneSetupGenerated.java   
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);
}
项目:n4js    文件:N4JSStandaloneSetupGenerated.java   
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);
}
项目:n4js    文件:N4MFStandaloneSetupGenerated.java   
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);
}
项目:Xtext_Xtend_HTML_Generator    文件:MyDslStandaloneSetupGenerated.java   
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);
}
项目:bromium    文件:BromiumStandaloneSetupGenerated.java   
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);
}
项目:gw4e.project    文件:DSLPoliciesStandaloneSetupGenerated.java   
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);
}
项目:lcdsl    文件:LcDslStandaloneSetupGenerated.java   
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);
}
项目:gemoc-studio    文件:DslStandaloneSetupGenerated.java   
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);
}
项目:org.xtext.dsl.restaurante    文件:RestauranteStandaloneSetupGenerated.java   
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);
}
项目:OCCI-Studio    文件:OCCIStandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:PureXbaseStandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:XbaseStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:Bug313089TestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-extras    文件:RefactoringTestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:ContentAssistTestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:RefactoringTestLanguage1StandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:RefactoringTestLanguage2StandaloneSetupGenerated.java   
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);
}
项目:xtext-extras    文件:BuilderTestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:IgnoreCaseImportsTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:ReferenceGrammarTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:RegionAccessTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:MultiRuleEnumTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:FowlerDslTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-extras    文件:EnumRulesTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:InheritanceTest3LanguageStandaloneSetupGenerated.java   
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);
}
项目:M2Doc    文件:MyDslStandaloneSetupGenerated.java   
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);
}
项目:minitl    文件:MinitlStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:XtextStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:UriBasedReaderTest.java   
@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);
}
项目:xtext-core    文件:ImportUriTestLanguageStandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:IndentationAwareUiTestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:PartialContentAssistTestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:TestLanguageStandaloneSetupGenerated.java   
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);
}
项目:xtext-core    文件:Bug250313StandaloneSetupGenerated.java   
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);
    }
}
项目:xtext-core    文件:Bug289059TestLanguageStandaloneSetupGenerated.java   
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);
    }
}