Esempio n. 1
0
  public static void showError(String message, Throwable t) {
    LOG.log(Level.SEVERE, "Сообщение: " + message, t);

    StringBuilder s = new StringBuilder(message).append('\n');
    s.append(t.getClass().getName()).append(": ").append(t.getLocalizedMessage());
    for (StackTraceElement e : t.getStackTrace()) {
      String line = e.toString();
      if (line.startsWith("my")) {
        s.append("\n    ").append(line);
      }
    }
    Alert alert = new Alert(Alert.AlertType.ERROR, s.toString(), ButtonType.OK);
    alert.showAndWait();
  }
Esempio n. 2
0
 public static String generateCommand(Tile node) {
   String packageString = node.data.get("package").replace(".", "/") + "/";
   String flags = node.data.get("flags");
   if (packageString == null) {
     return null;
   }
   StringBuilder cmd = new StringBuilder();
   cmd.append("jar cf");
   if (flags != null) {
     cmd.append(flags);
   }
   cmd.append(" ");
   cmd.append(node.data.get("jarname")).append(" ");
   cmd.append(packageString);
   return cmd.toString().trim();
 }