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;
}
}