コード例 #1
0
 @Override
 protected void initialize(IProgressMonitor monitor) {
   super.initialize(monitor);
   // register for Server started and Server stopped events
   EventService.getInstance().subscribe(this, new ServerStartedAndStoppedFilter());
   EventService.getInstance().subscribe(this, new LiveReloadClientRefreshFilter());
 }
コード例 #2
0
 /** Needs to properly stop everything when the LiveReload {@link IServer} is deleted. */
 @Override
 public void dispose() {
   super.dispose();
   try {
     if (liveReloadServer != null) {
       liveReloadServer.stop();
       for (Iterator<Entry<IServer, JettyServerRunner>> iterator =
               proxyRunners.entrySet().iterator();
           iterator.hasNext(); ) {
         Entry<IServer, JettyServerRunner> entry = iterator.next();
         JettyServerRunner runner = entry.getValue();
         JettyServerRunner.stop(runner);
         iterator.remove();
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }