Package com.onpositive.gae.baseviewer

Source Code of com.onpositive.gae.baseviewer.LocalServerLauncher

package com.onpositive.gae.baseviewer;

import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.swt.widgets.Display;

import com.onpositive.gae.tools.core.CheckLaunchJob;

public class LocalServerLauncher {
  public static CheckLaunchJob launchLocalServer(IJavaProject project) {
    CheckLaunchJob d = new CheckLaunchJob("Checking launch", project, false);
    d.schedule();
    // System.out.println("PRE LOOP");
    // int a = 0;
    long l1 = System.currentTimeMillis();
    long l2 = System.currentTimeMillis();
    while (d.getResult() == null && (l2 - l1) <= 30000) {

      Thread.yield();
      Display.getCurrent().readAndDispatch();
      l2 = System.currentTimeMillis();
      // a++;
    }
    return d;
  }
}
TOP

Related Classes of com.onpositive.gae.baseviewer.LocalServerLauncher

TOP
Copyright © 2018 www.massapi.com. 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.