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