Examples of JstdServerLifeCycleAdapter


Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

  }

  private void attachToServer(@NotNull JstdServer server) {
    ApplicationManager.getApplication().assertIsDispatchThread();
    myToolbar.updateActionsImmediately();
    server.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
      @Override
      public void onServerStopped() {
        myToolbar.updateActionsImmediately();
      }
    }, myProject);
View Full Code Here

Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

    return myRoot;
  }

  public void attachToServer(@NotNull final JstdServer server) {
    setInfoBodyHtml("Starting up...");
    server.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
      @Override
      public void onServerStarted() {
        JstdServerSettings settings = server.getSettings();
        String url = "http://127.0.0.1:" + settings.getPort() + "/capture";
        setInfoBodyHtml("To capture a browser open <a href='" + url + "'>" + url + "</a>");
View Full Code Here

Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

      JstdRunProfileState jstdState = JstdRunProfileState.cast(state);
      ExecutionResult executionResult = jstdState.executeWithServer(myServer);
      RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, environment);
      final RunContentDescriptor descriptor = contentBuilder.showRunContent(environment.getContentToReuse());
      if (myServer != null && executionResult.getProcessHandler() instanceof NopProcessHandler) {
        myServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
          @Override
          public void onBrowserCaptured(@NotNull JstdBrowserInfo info) {
            if (myFromDebug) {
              scheduleRestart(descriptor, 1000);
            }
View Full Code Here

Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

    if (originalRenderer != null) {
      myFormatter = new JstdRootTestProxyFormatter(myServer, treeView);
      originalRenderer.setAdditionalRootFormatter(myFormatter);
    }
    if (!myServer.isStopped() && myServer.getCapturedBrowsers().isEmpty()) {
      myServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
        @Override
        public void onServerStarted() {
          print("To capture a browser open ", ConsoleViewContentType.SYSTEM_OUTPUT);
          String url = myServer.getServerUrl() + "/capture";
          printHyperlink(url, new OpenUrlHyperlinkInfo(url));
          print("\n", ConsoleViewContentType.SYSTEM_OUTPUT);
        }
      }, this);
    }
    myServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
      @Override
      public void onServerTerminated(int exitCode) {
        print("JsTestDriver server finished with exit code " + exitCode + "\n", ConsoleViewContentType.SYSTEM_OUTPUT);
        JstdToolWindowManager.getInstance(getProperties().getProject()).show();
      }
View Full Code Here

Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

      RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, environment);
      final RunContentDescriptor descriptor = contentBuilder.showRunContent(environment.getContentToReuse());
      ProcessHandler processHandler = executionResult.getProcessHandler();
      if (processHandler instanceof NopProcessHandler) {
        if (myServer != null) {
          myServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
            @Override
            public void onBrowserCaptured(@NotNull JstdBrowserInfo info) {
              ExecutionUtil.restartIfActive(descriptor);
              myServer.removeLifeCycleListener(this);
            }
View Full Code Here

Examples of com.google.jstestdriver.idea.server.JstdServerLifeCycleAdapter

    if (serverUrl != null) {
      return createOSProcessHandler(serverUrl);
    }
    final NopProcessHandler nopProcessHandler = new NopProcessHandler();
    if (ideServer != null) {
      ideServer.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
        @Override
        public void onServerTerminated(int exitCode) {
          nopProcessHandler.destroyProcess();
        }
      }, myEnvironment.getProject());
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.