mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -51,6 +51,7 @@ public class JavaLineIndentProvider extends JavaLikeLangLineIndentProvider {
|
||||
SYNTAX_MAP.put(JavaTokenType.IF_KEYWORD, IfKeyword);
|
||||
SYNTAX_MAP.put(JavaTokenType.ELSE_KEYWORD, ElseKeyword);
|
||||
SYNTAX_MAP.put(JavaTokenType.FOR_KEYWORD, ForKeyword);
|
||||
SYNTAX_MAP.put(JavaTokenType.DO_KEYWORD, DoKeyword);
|
||||
SYNTAX_MAP.put(JavaTokenType.C_STYLE_COMMENT, BlockComment);
|
||||
SYNTAX_MAP.put(JavaDocTokenType.DOC_COMMENT_START, DocBlockStart);
|
||||
SYNTAX_MAP.put(JavaDocTokenType.DOC_COMMENT_END, DocBlockEnd);
|
||||
|
||||
+2
-1
@@ -53,6 +53,7 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
ElseKeyword,
|
||||
IfKeyword,
|
||||
ForKeyword,
|
||||
DoKeyword,
|
||||
BlockComment,
|
||||
DocBlockStart,
|
||||
DocBlockEnd,
|
||||
@@ -135,7 +136,7 @@ public abstract class JavaLikeLangLineIndentProvider implements LineIndentProvid
|
||||
else if (getPosition(editor, offset).matchesRule(
|
||||
position -> position.before().isAt(Colon) && position.isAfterOnSameLine(SwitchCase, SwitchDefault)
|
||||
) || getPosition(editor, offset).matchesRule(
|
||||
position -> position.before().isAt(ElseKeyword)
|
||||
position -> position.before().isAtAnyOf(ElseKeyword, DoKeyword)
|
||||
)) {
|
||||
return myFactory.createIndentCalculator(NORMAL, IndentCalculator.LINE_BEFORE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user