Examples of CheckLaunchJob


Examples of com.onpositive.gae.tools.core.CheckLaunchJob

          boolean isDebug) {
        String connectionString = null;
        if (isDebug) {
          int port = DebugServerLaunchManager.getPort(project);
          if (port == -1) {
            CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
                "Checking Launch", project, true);
            try {
              checkLaunchJob.schedule();
              checkLaunchJob.join();
            } catch (InterruptedException e) {

            }
            port = DebugServerLaunchManager.getPort(project);
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

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++;
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

    }.doCheck(project);
    if (debug) {
      int port = DebugServerLaunchManager.getPort(project);
      if (port == -1) {
        CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
            "Checking Launch", project, true);
        // try {
        checkLaunchJob.schedule();
        // int a = 0;
        long l1 = System.currentTimeMillis();
        long l2 = System.currentTimeMillis();
        while (checkLaunchJob.getResult() == null && (l2 - l1) <= 30000) {

          Thread.yield();
          Display current = Display.getCurrent();
          if (current != null) {
            current.readAndDispatch();
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

    boolean debug = isLocal;
    final IJavaProject javaGaeProject = UIUtils.getJavaGaeProject();
    if (javaGaeProject != null) {

      if (debug) {
        final CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
            "Checking server for "
                + javaGaeProject.getElementName(),
            javaGaeProject, shouldOpenBrowser());
        checkLaunchJob.addJobChangeListener(new JobChangeAdapter() {

          public void done(IJobChangeEvent event) {
            if (event.getResult().isOK()) {
              Display.getDefault().asyncExec(new Runnable() {

                public void run() {
                  try {
                    openViewer(javaGaeProject,
                        getUrl(checkLaunchJob));
                  } catch (PartInitException e) {
                    Activator.log(e);
                  }
                }
              });

            }
            super.done(event);
          }

        });
        checkLaunchJob.schedule();

      } else {
               
        try {
          IProject project = javaGaeProject.getProject();
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

  }

  private int openLocal(IJavaProject project, IWebBrowser createBrowser) {
    int port = DebugServerLaunchManager.getPort(project);
    if (port == -1) {
      CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
          "Checking Launch", project, true);
      // try {
      checkLaunchJob.schedule();
      int a = 0;
      IStatus result = null;
      long l1 = System.currentTimeMillis();
      long l2 = System.currentTimeMillis();
      while ((result = checkLaunchJob.getResult()) == null && l2-l1 <= 30000) {
        Thread.yield();
        Display.getCurrent().readAndDispatch();
        l2 = System.currentTimeMillis();
        a++;
      }
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

        return;
      }
    }

    if (debug) {
      CheckLaunchJob d = new CheckLaunchJob("Checking launch", project,
          false);
      d.schedule();

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

      if (d.getPort() == -1) {
        return;
      }
    }

    final CTabItem cTabItem = new CTabItem(viewHolder, SWT.CLOSE);
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

      AnnotationsStorage.addKnownKind(project.getProject(), name);
    } catch (CoreException e) {
      Activator.log(e);
    }
    if (debug) {
      CheckLaunchJob d =  LocalServerLauncher.launchLocalServer(project);

      if (d.getPort() == -1) {
        return;
      }
    }

    final CTabItem cTabItem = new CTabItem(viewHolder, SWT.CLOSE);
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

    }.doCheck(project);
    if (debug) {
      int port = DebugServerLaunchManager.getPort(project);
      if (port == -1) {
        CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
            "Checking Launch", project, true);
        // try {
        checkLaunchJob.schedule();
        // int a = 0;
        long l1 = System.currentTimeMillis();
        long l2 = System.currentTimeMillis();
        while (checkLaunchJob.getResult() == null && (l2 - l1) <= 30000) {

          Thread.yield();
          Display.getCurrent().readAndDispatch();
          l2 = System.currentTimeMillis();
          // a++;
View Full Code Here

Examples of com.onpositive.gae.tools.core.CheckLaunchJob

  private static String getUri(IJavaProject project, boolean debug) {
    String connectionString;
    if (debug) {
      int port = DebugServerLaunchManager.getPort(project);
      if (port == -1) {
        CheckLaunchJob checkLaunchJob = new CheckLaunchJob(
            "Checking Launch", project, true);
        try {
          checkLaunchJob.schedule();
          checkLaunchJob.join();
        } catch (InterruptedException e) {

        }
        port = DebugServerLaunchManager.getPort(project);
View Full Code Here
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.