Beispiel #1
0
 public Process startPVS() throws IOException {
   if ((new File(getPVSLocation()).exists())) {
     Runtime runtime = Runtime.getRuntime();
     process = runtime.exec(getPVSStartingCommand());
     for (PVSStateChangeListener l : stateListeners) {
       l.sourceChanged(PVSConstants.PVSRUNNING, PVSConstants.TRUE);
     }
     mode = PVSMode.LISP;
   } else {
     Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
     MessageDialog.openError(
         shell, "PVS Not found", "Please enter the correct path to PVS in the preference page.");
   }
   return process;
 }
Beispiel #2
0
 public void stopPVS() {
   if (iprocess != null) {
     if (iprocess.canTerminate()) {
       try {
         iprocess.terminate();
         iprocess = null;
         process = null;
         for (PVSStateChangeListener l : stateListeners) {
           l.sourceChanged(PVSConstants.PVSRUNNING, PVSConstants.FALSE);
         }
         DebugPlugin.getDefault().removeDebugEventListener(instance);
       } catch (DebugException e) {
         e.printStackTrace();
       }
     }
   }
   mode = PVSMode.OFF;
 }