Package org.eclipse.emf.ecore.resource

Examples of org.eclipse.emf.ecore.resource.Resource.save()


    } catch (YouShallNotDoThisException e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
    }
    try {
      res.save(null);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here


    m_oResourceXMIOut.getContents().add(company);
    m_oResourceXMIOut.getContents().add(employee);
    //m_oResourceXMIOut.getContents().add(company2);
    try {
      m_oOptions.put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
      m_oResourceXMIOut.save(m_oOptions);
    }
    catch(IOException e)
    {}
  }
View Full Code Here

   
    // save instance
    m_oResourceXMIOut.getContents().add(oNode);
    try {
      m_oOptions.put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
      m_oResourceXMIOut.save(m_oOptions);
    }
    catch(IOException e)
    {}

   
View Full Code Here

    Resource resource = RESOURCE_SET.createResource(URI
        .createFileURI(fileName));
    resource.getContents().addAll(model);

    try {
      resource.save(null);
    } catch (IOException ioe) {
      err(ioe.getMessage());
    }
  }
View Full Code Here

    try {
      ActivityTestCaseGraphResourceFactoryImpl resFactory = new ActivityTestCaseGraphResourceFactoryImpl();
      Resource res = resFactory.createResource(URI.createFileURI(actTCGFile.getLocationURI().getPath()));
      res.getContents().add(tcgActivity);
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      res.save(out, null);
      actTCGFile.create(new ByteArrayInputStream(out.toByteArray()),
          false, null);
      amplFile.create(new ByteArrayInputStream(amplModel.getBytes()),
          false, null);
      amplCommands.create(new ByteArrayInputStream(amplRun.getBytes()),
View Full Code Here

    Resource resource = RESOURCE_SET.createResource(URI
        .createFileURI(fileName));
    resource.getContents().addAll(model);

    try {
      resource.save(null);
    } catch (IOException ioe) {
      err(ioe.getMessage());
    }
  }
View Full Code Here

              // Save the contents of the resource to the file system.
              //
              Map<Object, Object> options = new HashMap<Object, Object>();
              options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
              resource.save(options);
            }
            catch (Exception exception) {
              DispelEditorPlugin.INSTANCE.log(exception);
            }
            finally {
View Full Code Here

      }
    };
    try {
      OperationHistoryFactory.getOperationHistory().execute(command,
          new NullProgressMonitor(), null);
      diagramResource
          .save(eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLDiagramEditorUtil
              .getSaveOptions());
      eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLDiagramEditorUtil
          .openDiagram(diagramResource);
    } catch (ExecutionException e) {
View Full Code Here

                  nextResource.getURI()));
          if (nextResource.isLoaded()
              && !info.getEditingDomain()
                  .isReadOnly(nextResource)) {
            try {
              nextResource.save(DispelDiagramEditorUtil
                  .getSaveOptions());
            } catch (IOException e) {
              fireElementStateChangeFailed(element);
              throw new CoreException(new Status(IStatus.ERROR,
                  DispelDiagramEditorPlugin.ID,
View Full Code Here

              throws ExecutionException {
            newResource.getContents().add(diagramCopy);
            return CommandResult.newOKCommandResult();
          }
        }.execute(monitor, null);
        newResource.save(DispelDiagramEditorUtil.getSaveOptions());
      } catch (ExecutionException e) {
        fireElementStateChangeFailed(element);
        throw new CoreException(new Status(IStatus.ERROR,
            DispelDiagramEditorPlugin.ID, 0,
            e.getLocalizedMessage(), null));
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.