Examples of XMIResourceImpl


Examples of org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl()
    {
      @Override
      public Resource createResource(URI uri)
      {
        return new XMIResourceImpl(uri)
        {
          @Override
          protected boolean useUUIDs()
          {
            return true;
View Full Code Here

Examples of org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

        task.getDeploy().setApplication( ParametersFactory.eINSTANCE.createApplication() );
        task.getDeploy().getApplication().setName( fFirstPage.getProjectName() );       
        task.getDeploy().setInfo( ParametersFactory.eINSTANCE.createInfo() );
        task.setSignjar( AntTasksFactory.eINSTANCE.createSignJar() );
       
        final XMIResource resource= new XMIResourceImpl();
        resource.getContents().add( task );
       
        WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
          @Override
          public void execute( IProgressMonitor monitor ) {

            if ( !resource.getContents().isEmpty() ) {
              Map<Object, Object> options = new HashMap<Object, Object>();
              options.put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);

              ByteArrayOutputStream streamOut = null;
              ByteArrayInputStream streamIn = null;
              try {
                streamOut = new ByteArrayOutputStream();
                resource.save( streamOut, options );
                streamIn = new ByteArrayInputStream( streamOut.toByteArray() );
                buildFile.create( streamIn, true, monitor );
              }
              catch ( IOException | CoreException e ) {
                // TODO Auto-generated catch block
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.