diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java index 1d61783c818e..c5cd1618a426 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java @@ -138,7 +138,8 @@ public abstract class JavaLikeLangLineIndentProvider extends FormatterBasedLineI } else { SemanticEditorPosition position = getPosition(editor, offset); - if (position.before().isAt(RightParenthesis)) { + position = position.before().beforeOptional(LineComment).beforeOptional(Whitespace); + if (position.isAt(RightParenthesis)) { int offsetAfterParen = position.getStartOffset() + 1; position.beforeParentheses(LeftParenthesis, RightParenthesis); if (!position.isAtEnd()) {