private int getNonEmptyLineBefore(int line) {
      CharSequence docChars = myDocument.getCharsSequence();
      for (int lineBefore = line - 1; lineBefore >= 0; lineBefore --) {
        if (!containsWhitespacesOnly(docChars, myDocument.getLineStartOffset(lineBefore), myDocument.getLineEndOffset(lineBefore))) {
          return lineBefore;
        }
      }
      return -1;
    }
private int getNonEmptyLineBefore(int line)