コード例 #1
0
ファイル: PVSExecutionManager.java プロジェクト: Lanozavr/pvs
 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;
 }
コード例 #2
0
 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;
   }
 }