Example #1
0
  private String getProcessStreamMessage(String output) {
    StringBuilder msg = new StringBuilder();

    if (output.length() != 0) {
      msg.append("Dartium stdout: ").append(output).append("\n");
    }

    boolean expired = false;

    if (output.length() != 0) {
      if (output.indexOf("Dartium build has expired") != -1) {
        expired = true;
      }

      if (expired) {
        msg.append("\nThis build of Dartium has expired.\n\n");
        msg.append("Please download a new Dart Editor or Dartium build from \n");
        msg.append("http://www.dartlang.org/downloads.html.");
      }
    }

    if (DartCore.isLinux() && !expired) {
      msg.append("\nFor information on how to setup your machine to run Dartium visit ");
      msg.append("http://code.google.com/p/dart/wiki/PreparingYourMachine#Linux");
    }

    if (msg.length() != 0) {
      msg.insert(0, ":\n\n");
    } else {
      msg.append(".");
    }

    return msg.toString();
  }
  @Override
  public void activateApplication(File application, String name) {
    if (DartCore.isMac()) {
      activateApplicationMacOS(application);
    } else if (DartCore.isWindows()) {
      bringWindowToFrontWin32(".*" + name + "\\z");
    } else if (DartCore.isLinux()) {
      // This is not necessary on Linux.

    }
  }