Package q_impress.pmi.lib.services.loadsave

Examples of q_impress.pmi.lib.services.loadsave.SavingService.invoke()


    try {
     
      savingService.setOutStream(outStream);
      savingService.setTarget(project);
      savingService.initialize();
      savingService.invoke();
     
      inStream = new ByteArrayInputStream(outStream.toByteArray());
     
      if (file.exists()) {
        file.setContents(inStream, true, true, null);
View Full Code Here


    try {
     
      savingService.setOutStream(outStream);
      savingService.setTarget(project);
      savingService.initialize();
      savingService.invoke();
     
      inStream = new ByteArrayInputStream(outStream.toByteArray());
      targetModelResource.setContents(inStream, true, true, null);
    } catch (ServiceException e) {
      throw new ExecutionException("Unable to create model.", e);
View Full Code Here

        SavingService savingService = new SavingService();
        savingService.setOutStream(stream);
        savingService.setTarget(project);
        try {
          savingService.initialize();
          savingService.invoke();
        } catch (ServiceException e) {
          e.printStackTrace();
          assertTrue(false);
        }
      } finally {
View Full Code Here

    InputStream inStream = null;
    try {
      service.setTarget(project);
      service.setOutStream(outStream);
      service.initialize();
      service.invoke();
     
      inStream = new ByteArrayInputStream(outStream.toByteArray());
      ((IFile)ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(projectFileName))).setContents(inStream, true, false, monitor);
    } catch (ServiceException e) {
      throwCoreException("Unable to save modeling project.", e);
View Full Code Here

      try {
        SavingService service = new SavingService();
        service.setOutStream(outStream);
        service.setTarget(project);
        service.initialize();
        service.invoke();
       
        Document doc = new Document();
        doc.set(outStream.toString());
        return doc;
      } catch (ServiceException e) {
View Full Code Here

    try {
      SavingService service = new SavingService();
      service.setOutStream(outStream);
      service.setTarget(this.projectInput.getProject());
      service.initialize();
      service.invoke();
     
      monitor.worked(1);
     
      monitor.setTaskName("Persisting model on file");
      ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
View Full Code Here

    InputStream inStream = null;
    try {
      service.setTarget(project);
      service.setOutStream(outStream);
      service.initialize();
      service.invoke();
     
      inStream = new ByteArrayInputStream(outStream.toByteArray());
      ((IFile)ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(projectFileName))).setContents(inStream, true, false, monitor);
    } catch (ServiceException e) {
      throwCoreException("Unable to save modeling project.", 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.