Package com.puppetlabs.geppetto.ruby.resource

Examples of com.puppetlabs.geppetto.ruby.resource.PptpRubyResourceFactory


    Map<String, Object> factoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
    if(!factoryMap.containsKey("pptp"))
      factoryMap.put("pptp", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());

    if(!factoryMap.containsKey("rb"))
      factoryMap.put("rb", new PptpRubyResourceFactory());

    Injector mainInjector = super.createInjectorAndDoEMFRegistration();

    doPptpSetup();
    return mainInjector;
View Full Code Here


    Map<String, Object> factoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap();
    if(!factoryMap.containsKey("pptp"))
      factoryMap.put("pptp", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());

    if(!factoryMap.containsKey("rb"))
      factoryMap.put("rb", new PptpRubyResourceFactory());
  }
View Full Code Here

  }

  private void doFunctionResource(String path, String functionName, boolean register) throws IOException {
    ResourceSet resourceSet = new ResourceSetImpl();
    if(register)
      resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("rb", new PptpRubyResourceFactory());
    File aRubyFile = TestDataProvider.getTestFile(new Path(path));
    URI uri = URI.createFileURI(aRubyFile.getAbsolutePath());
    Resource r = resourceSet.getResource(uri, true);

    assertEquals("Should have loaded one thing", 1, r.getContents().size());
View Full Code Here

    assertTrue("Should be an rValue", func.isRValue());
  }

  private TypeFragment doTypeFragmentResource(String path, String typeName) throws IOException {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("rb", new PptpRubyResourceFactory());
    File aRubyFile = TestDataProvider.getTestFile(new Path(path));
    URI uri = URI.createFileURI(aRubyFile.getAbsolutePath());
    Resource r = resourceSet.getResource(uri, true);

    assertEquals("Should have loaded one thing", 1, r.getContents().size());
View Full Code Here

    return type;
  }

  private Type doTypeResource(String path, String typeName) throws IOException {
    ResourceSet resourceSet = new ResourceSetImpl();
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("rb", new PptpRubyResourceFactory());
    File aRubyFile = TestDataProvider.getTestFile(new Path(path));
    URI uri = URI.createFileURI(aRubyFile.getAbsolutePath());
    Resource r = resourceSet.getResource(uri, true);

    assertEquals("Should have loaded one thing", 1, r.getContents().size());
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.ruby.resource.PptpRubyResourceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.