private static boolean isAtBlockOpeningOnSameLine(@NotNull SemanticEditorPosition position) {
    SemanticEditorPosition pos = position.copy();
    while (!pos.isAt(BlockOpeningBrace)) {
      pos.moveBefore();
      if (pos.isAtEnd() || pos.isAtMultiline()) {
        return false;
      }
    }
    return true;
  }
private static boolean isAtBlockOpeningOnSameLine(@NotNull SemanticEditorPosition position)