Examples of SaveOptions


Examples of com.projity.session.SaveOptions

//    };

  }
  protected void saveLocalDocument(Project project,String fileName){
    //showWaitCursor(true);
    SaveOptions opt=new SaveOptions();
    opt.setFileName(fileName);
    opt.setLocal(true);
    opt.setPreSaving(getSavingClosure());

      projectFactory.saveProject(project,opt);
    //showWaitCursor(false);
  }
View Full Code Here

Examples of com.projity.session.SaveOptions

        }
      }
    });
    if (projects.size()>0){
      Session session=SessionFactory.getInstance().getSession(opt.isLocal());
      final SaveOptions o=(SaveOptions)opt.clone();
      o.setPostSaving(new Closure() {
        public void execute(Object obj) {
          Project p = (Project)obj;
          p.setAllTasksAsUnchangedFromPersisted(true);
          p.validateNewDistributionMap();
          portfolio.handleExternalTasks(p,false, true);     // external link handling
View Full Code Here

Examples of com.projity.session.SaveOptions

//        }
//      }

      int promptResult = promptForSave(project,allowCancel);
      if (promptResult == JOptionPane.YES_OPTION){
        SaveOptions opt=new SaveOptions();
        opt.setLocal(project.isLocal());
        if (project.isLocal()){
          String fileName=project.getFileName();
          if (fileName==null){
            fileName=SessionFactory.getInstance().getLocalSession().chooseFileName(true,project.getGuessedFileName());
          }
          if (fileName==null) return null;
          project.setFileName(fileName);
          opt.setFileName(fileName);
          opt.setImporter(LocalSession.getImporter(project.getFileType()));
        }
        job=getSaveProjectJob(project, opt);
      }
      else if (promptResult == JOptionPane.CANCEL_OPTION)
        return null;
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

      return exports.get(matching.get(0));
    return null;
  }

  public String serialize(EObject obj) {
    SaveOptions options = SaveOptions.newBuilder().getOptions();
    return getSerializer().serialize(obj, options);
  }
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

    return new AssertableResourceDiagnostics(r.getWarnings());
  }

  @Override
  public String serialize(EObject obj) {
    SaveOptions options = SaveOptions.newBuilder().getOptions();
    // System.err.println(options.toString());
    return getSerializer().serialize(obj, options);
  }
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

      final String expectedFormattedSample = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      this.validationHelper.assertNoErrors(model);
      SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
      SaveOptions.Builder _format = _newBuilder.format();
      SaveOptions _options = _format.getOptions();
      final String resultFormattedCode = this._iSerializer.serialize(model, _options);
      Assert.assertEquals(expectedFormattedSample, resultFormattedCode);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

      final String expectedFormattedSample = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      this.validationHelper.assertNoErrors(model);
      SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
      SaveOptions.Builder _format = _newBuilder.format();
      SaveOptions _options = _format.getOptions();
      final String resultFormattedCode = this._iSerializer.serialize(model, _options);
      Assert.assertEquals(expectedFormattedSample, resultFormattedCode);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

      final String expectedFormattedSample = _builder_1.toString();
      final Model model = this.parser.parse(sample);
      this.validationHelper.assertNoErrors(model);
      SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
      SaveOptions.Builder _format = _newBuilder.format();
      SaveOptions _options = _format.getOptions();
      final String resultFormattedCode = this._iSerializer.serialize(model, _options);
      Assert.assertEquals(expectedFormattedSample, resultFormattedCode);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

Examples of org.eclipse.xtext.resource.SaveOptions

      final ContainerType cloner = this._deepCloneUtils.asContainer(_get);
      ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList("paragraph");
      this._deepCloneUtils.addFields(cloner, _newArrayList);
      SaveOptions.Builder _newBuilder = SaveOptions.newBuilder();
      SaveOptions.Builder _format = _newBuilder.format();
      SaveOptions _options = _format.getOptions();
      final String result = this._iSerializer.serialize(model, _options);
      StringConcatenation _builder_1 = new StringConcatenation();
      _builder_1.append("deepClone");
      _builder_1.newLine();
      _builder_1.append("package my.home.cloners");
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.