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


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

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

      ByteArrayOutputStream os = new ByteArrayOutputStream();

      Map<Object, Object> optionsMap = new LinkedHashMap<Object, Object>();

      resource.save(os, optionsMap);

      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());

      Generator generator = new Generator(is);
     
View Full Code Here

      ByteArrayOutputStream os = new ByteArrayOutputStream();

      Map<Object, Object> optionsMap = new LinkedHashMap<Object, Object>();

      resource.save(os, optionsMap);

      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());

      Generator generator = new Generator(is);
     
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

                      nextResource.getURI()));
          if (nextResource.isLoaded()
              && !info.getEditingDomain()
                  .isReadOnly(nextResource)) {
            try {
              nextResource
                  .save(eu.admire.visual.pmml.treemodel._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.treemodel._40.diagram.part.PMMLDiagramEditorUtil
                .getSaveOptions());
      } catch (ExecutionException e) {
        fireElementStateChangeFailed(element);
        throw new CoreException(
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

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

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.