Exemplo n.º 1
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;
 }
 private void terminateForked() {
   if (killPorts != null) {
     for (int killPort : killPorts) {
       try {
         URI killUrl = new URI("http://localhost:" + killPort);
         HttpUtil.ping(killUrl);
       } catch (Throwable e) {
       }
     }
   }
   if (processes != null && processes.length > 1) {
     // Make sure all processes are terminated
     for (IProcess process : processes) {
       try {
         if (process.canTerminate() && !process.isTerminated()) {
           process.terminate();
         }
       } catch (Throwable e) {
         GrailsCoreActivator.log(e);
       }
     }
     processes = null;
   }
 }