mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Skip array content when searching for statement start (fixes WEB-24067 Some bugs with reformat code)
This commit is contained in:
@@ -43,6 +43,7 @@ public class JavaLineIndentProvider extends JavaLikeLangLineIndentProvider {
|
||||
SYNTAX_MAP.put(JavaTokenType.LBRACE, BlockOpeningBrace);
|
||||
SYNTAX_MAP.put(JavaTokenType.RBRACE, BlockClosingBrace);
|
||||
SYNTAX_MAP.put(JavaTokenType.LBRACKET, ArrayOpeningBracket);
|
||||
SYNTAX_MAP.put(JavaTokenType.RBRACKET, ArrayClosingBracket);
|
||||
SYNTAX_MAP.put(JavaTokenType.RPARENTH, RightParenthesis);
|
||||
SYNTAX_MAP.put(JavaTokenType.LPARENTH, LeftParenthesis);
|
||||
SYNTAX_MAP.put(JavaTokenType.COLON, Colon);
|
||||
|
||||
+4
@@ -45,6 +45,7 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
BlockOpeningBrace,
|
||||
BlockClosingBrace,
|
||||
ArrayOpeningBracket,
|
||||
ArrayClosingBracket,
|
||||
RightParenthesis,
|
||||
LeftParenthesis,
|
||||
Colon,
|
||||
@@ -199,6 +200,9 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
else if (position.isAt(BlockClosingBrace)) {
|
||||
position.beforeParentheses(BlockOpeningBrace, BlockClosingBrace);
|
||||
}
|
||||
else if (position.isAt(ArrayClosingBracket)) {
|
||||
position.beforeParentheses(ArrayOpeningBracket, ArrayClosingBracket);
|
||||
}
|
||||
else if (position.isAtAnyOf(Semicolon,
|
||||
BlockOpeningBrace,
|
||||
BlockComment,
|
||||
|
||||
Reference in New Issue
Block a user