mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
indenter: distinguish control structure from call (WEB-52005)
GitOrigin-RevId: 9c65a140259e16b6e98f4a1f50a634b4b1686a97
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1f5baef559
commit
6be1da1730
+7
-5
@@ -405,13 +405,15 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
SemanticEditorPosition candidate = curr.copy();
|
||||
curr.moveBefore();
|
||||
curr.moveBeforeOptionalMix(Whitespace, LineComment, BlockComment);
|
||||
if (!curr.isAt(RightParenthesis)) {
|
||||
return candidate.getStartOffset();
|
||||
}
|
||||
else {
|
||||
if (curr.isAt(RightParenthesis)) {
|
||||
curr.moveBeforeParentheses(LeftParenthesis, RightParenthesis);
|
||||
continue;
|
||||
SemanticEditorPosition controlStructureCheck = curr.copy();
|
||||
controlStructureCheck.moveBeforeOptionalMix(Whitespace, LineComment, BlockComment);
|
||||
if (isStartOfStatementWithOptionalBlock(controlStructureCheck)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return candidate.getStartOffset();
|
||||
}
|
||||
else if (curr.isAt(BlockClosingBrace)) {
|
||||
curr.moveBeforeParentheses(BlockOpeningBrace, BlockClosingBrace);
|
||||
|
||||
Reference in New Issue
Block a user