Package org.eclipse.emf.ecore.resource

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


              // 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


                  .hasNext();) {
                Resource nextResource = (Resource) it.next();
                if (nextResource.isLoaded()
                    && !getEditingDomain().isReadOnly(
                        nextResource)) {
                  nextResource
                      .save(eu.admire.visual.pmml._40.diagram.part.PMMLDiagramEditorUtil
                          .getSaveOptions());
                }
              }
            } catch (IOException ex) {
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(DispelDiagramEditorUtil.getSaveOptions());
      DispelDiagramEditorUtil.openDiagram(diagramResource);
    } catch (ExecutionException e) {
      DispelDiagramEditorPlugin.getInstance().logError(
          "Unable to create model and diagram", e);
    } catch (IOException ex) {
View Full Code Here

      }
    };
    try {
      OperationHistoryFactory.getOperationHistory().execute(command,
          new NullProgressMonitor(), null);
      diagramResource.save(DispelDiagramEditorUtil.getSaveOptions());
      DispelDiagramEditorUtil.openDiagram(diagramResource);
    } catch (ExecutionException e) {
      DispelDiagramEditorPlugin.getInstance().logError(
          "Unable to create model and diagram", e); //$NON-NLS-1$
    } catch (IOException ex) {
View Full Code Here

            runnable.run();
          }
        });

    try {
      diagramResource.save(getSaveOptions());
    } catch (IOException e) {
      MessageDialog.openError(Utility.getShell(),
          "Save Failed",
          "Failed to save diagram resource");
      Activator.logError("Failed to save diagram resource", e);
View Full Code Here

    IResource file = workspaceRoot.findMember(uri.toPlatformString(true));
   
    try {
      if (file == null || !file.exists()) {
        Resource createResource = rSet.createResource(uri);
        createResource.save(new HashMap());
        createResource.setTrackingModification(true);
      }
    } catch (IOException e) {
      Activator.logError("Failed to write model resource", e);
    }
View Full Code Here

                      nextResource.getURI()));
          if (nextResource.isLoaded()
              && !info.getEditingDomain()
                  .isReadOnly(nextResource)) {
            try {
              nextResource
                  .save(eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLDiagramEditorUtil
                      .getSaveOptions());
            } catch (IOException e) {
              fireElementStateChangeFailed(element);
              throw new CoreException(
View Full Code Here

              throws ExecutionException {
            newResource.getContents().add(diagramCopy);
            return CommandResult.newOKCommandResult();
          }
        }.execute(monitor, null);
        newResource
            .save(eu.admire.visual.pmml.neuralnetwork._40.diagram.part.PMMLDiagramEditorUtil
                .getSaveOptions());
      } catch (ExecutionException e) {
        fireElementStateChangeFailed(element);
        throw new CoreException(
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

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.