Package net.sf.graphiti.io

Examples of net.sf.graphiti.io.GenericGraphWriter


    IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
    graph.setFileName(filePath);

    // writes graph
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    GenericGraphWriter writer = new GenericGraphWriter(graph);
    try {
      writer.write(file.getLocation().toString(), out);
      return new ByteArrayInputStream(out.toByteArray());
    } catch (RuntimeException e) {
      errorMessage("Exception", e);
    }
View Full Code Here


    // validate and then save
    validate();

    IFile file = ((IFileEditorInput) getEditorInput()).getFile();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    GenericGraphWriter writer = new GenericGraphWriter(graph);
    try {
      writer.write(file.getLocation().toString(), out);
      file.setContents(new ByteArrayInputStream(out.toByteArray()), true,
          false, monitor);
      try {
        out.close();
      } catch (IOException e) {
View Full Code Here

TOP

Related Classes of net.sf.graphiti.io.GenericGraphWriter

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.