Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yann Cébron
2016-11-09 11:28:46 +01:00
2 changed files with 3 additions and 1 deletions
@@ -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);
@@ -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);
}