Package com.google.devtools.depan.eclipse.persist

Examples of com.google.devtools.depan.eclipse.persist.ObjectXmlPersist.save()


  public void doSave(IProgressMonitor monitor) {
    try {
      // TODO(leeca):  Is this configured with the correct XStream flavor?
      ObjectXmlPersist persist =
          new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
      persist.save(uri, migrationTask);
      setDirtyState(false);
    } catch (IOException errIo) {
      monitor.setCanceled(true);
      throw new RuntimeException(
          "Unable to save migration task to " + uri, errIo);
View Full Code Here


  private static void saveViewDocument(IFile viewFile, ViewDocument viewInfo)
      throws IOException {
    XStream xstream = XStreamFactory.newStaxXStream();
    XStreamFactory.configureRefXStream(xstream);
    ObjectXmlPersist persist = new ObjectXmlPersist(xstream);
    persist.save(viewFile.getRawLocationURI(), viewInfo);
  }

  @Override
  public void doSave(IProgressMonitor monitor) {
    // If there are any file problems, do this as a Save As ..
View Full Code Here

    // save the builtins relationships as an "example" in the file.
    // TODO(leeca):  Is this configured with the correct XStream flavor?
    ObjectXmlPersist persist =
        new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
    persist.save(file.getLocationURI(), Collections.EMPTY_LIST);

    monitor.worked(1);
  }

  private void throwCoreException(String message) throws CoreException {
View Full Code Here

    ObjectXmlPersist persist =
        new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
    Collection<RelationshipSet> updateSet = loadRelationshipSet(persist, file);
    RelationshipSet set = DefaultRelationshipSet.SET;
    updateSet.add(set);
    persist.save(file.getLocationURI(), updateSet);
    file.refreshLocal(IResource.DEPTH_ZERO, null);
  }

  /**
   * Isolate unchecked conversion.
View Full Code Here

    // save data in the file
    // TODO(leeca):  Is this configured with the correct XStream flavor?
    ObjectXmlPersist persist =
        new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
    persist.save(file.getLocationURI(), collection);
    file.refreshLocal(IResource.DEPTH_ZERO, null);
  }

  @Override
  public void addPages() {
View Full Code Here

  public void doSave(IProgressMonitor monitor) {
    try {
      // TODO(leeca):  Is this configured with the correct XStream flavor?
      ObjectXmlPersist persist =
          new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
      persist.save(file.getRawLocationURI(), sets);

      setDirtyState(false);

      // touch the file, to notify listeners about the changes
      file.touch(monitor);
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.