Package q_impress.pmi.lib.services.loadsave

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


      try {
        inStream = modelFile.getContents();
        service.setInStream(inStream);
        service.setLocationSolver(new WorkspaceLocationSolver());
        service.initialize();
        service.invoke();
       
        if (service.getLoadedResource() instanceof ModelingProject) return (ModelingProject) service.getLoadedResource();
        else throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to load model, invalid file."));
      } catch (CoreException e) {
        throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to load model.", e));
View Full Code Here


    try {
      inStream = ((IFile)targetModelResource).getContents();
      loadingService.setInStream(inStream);
      loadingService.setLocationSolver(new WorkspaceLocationSolver());
      loadingService.initialize();
      loadingService.invoke();
      q_impress.pmi.lib.project.IResource tempRes = loadingService.getLoadedResource();
      if (!(tempRes instanceof ModelingProject)) throw new ExecutionException("Invalid model file.");
      else project = (ModelingProject) tempRes;
    } catch (CoreException e) {
      throw new ExecutionException("Unable to load model.", e);
View Full Code Here

        try {
          inStream = res.getContents();
          service.setInStream(inStream);
          service.setLocationSolver(new WorkspaceLocationSolver());
          service.initialize();
          service.invoke();
         
          if (service.getLoadedResource() instanceof ModelingProject) model = (ModelingProject) service.getLoadedResource();
          else model = null;
        } catch (CoreException e) {
          model = null;
View Full Code Here

      try {
        LoadingService loadingService = new LoadingService();
        loadingService.setInStream(stream);
        try {
          loadingService.initialize();
          loadingService.invoke();
          IResource prj = loadingService.getLoadedResource();
          int a = 1;
          a++;
        } catch (ServiceException e) {
          e.printStackTrace();
View Full Code Here

        try {
          inStream = res.getContents();
          service.setInStream(inStream);
          service.setLocationSolver(new WorkspaceLocationSolver());
          service.initialize();
          service.invoke();
         
          if (service.getLoadedResource() instanceof ModelingProject) project = (ModelingProject) service.getLoadedResource();
          else project = null;
        } catch (CoreException e) {
          project = null;
View Full Code Here

     
      LoadingService service = new LoadingService();
      service.setInStream(inStream);
      service.setLocationSolver(new WorkspaceLocationSolver());
      service.initialize();
      service.invoke();
     
      IResource loadedRes = service.getLoadedResource();
      if (!(loadedRes instanceof ModelingProject)) throw new PartInitException(new Status(IStatus.ERROR, "q_impress", "Invalid input for editor."));
      else {
        this.setInput(new ModelingProjectEditorInput((ModelingProject) loadedRes, this.originalInput));
View Full Code Here

        try {
          inStream = res.getContents();
          service.setInStream(inStream);
          service.setLocationSolver(new WorkspaceLocationSolver());
          service.initialize();
          service.invoke();
         
          if (service.getLoadedResource() instanceof ModelingProject) project = (ModelingProject) service.getLoadedResource();
          else project = null;
        } catch (CoreException e) {
          project = null;
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.