public boolean containsOnlyWhitespaces() {
    for (int i = 0; i < myStringBuilder.length(); i++) {
      if (myStringBuilder.charAt(i) != ' ') {
        return false;
      }
    }
    return true;
  }
If the current group is applied, add a newline here. Otherwise, add the argument.
If {@code dedent} is true, the extra indent from this group is unapplied from this point on.
src/org/jetbrains/java/decompiler/util/TextBuffer.java