Package q_impress.pmi.lib.atop

Examples of q_impress.pmi.lib.atop.PrismModelResource


  private void launchPrismModels(ModelingProject rootModel, ILaunchConfiguration configuration,
      ILaunch launch, IProgressMonitor monitor) throws CoreException {
   
    Map<String,AtopTranslationTask> tasks = rootModel.getAllResources(AtopTranslationTask.class);
    for (AtopTranslationTask task : tasks.values()) {
      PrismModelResource modelRes = null;
      PrismPropertiesResource propsRes = null;
      for (AbstractResource res : task.getOutputResources().values()) {
        if (res instanceof PrismModelResource) modelRes = (PrismModelResource) res;
        if (res instanceof PrismPropertiesResource) propsRes = (PrismPropertiesResource) res;
      }
     
      if (modelRes == null || propsRes == null)
        throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to launch PRISM model checking for " + task.getName()));
     
      monitor.setTaskName("Launching prism model : " + modelRes.getLocation());
     
      // compute working dir
      IResource workingDir = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(modelRes.getLocation())).getParent();
     
      try {
        String[] cmdLine = {
            getPrismCmdPath() ,
            rootModel.getLocationSolver().getAbsoluteLocation(modelRes.getLocation()),
            rootModel.getLocationSolver().getAbsoluteLocation(propsRes.getLocation()),
            "-fixdl",
            "-exportresults",
            rootModel.getLocationSolver().getAbsoluteLocation(modelRes.getLocation()) + ".res"};
       
        Process prismProcess = DebugPlugin.exec(cmdLine, new File(workingDir.getLocation().toPortableString()));
        DebugPlugin.newProcess(launch, prismProcess, "Prism Model " + cmdLine[2]);
        monitor.worked(1);
      } catch (LocationException e) {
View Full Code Here


 
  public JmtTranslationTask(ModelingProject project) throws ResourceException {
    super(TRANSLATOR_NAME);
    this.structure = new AtomicResourceStructure(this);
   
    jmtResource = new PrismModelResource();
    project.addResource(jmtResource);
  }
View Full Code Here

TOP

Related Classes of q_impress.pmi.lib.atop.PrismModelResource

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.