本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.FINALLY_KEYWORD属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.FINALLY_KEYWORD属性的具体用法?Java JSTokenTypes.FINALLY_KEYWORD怎么用?Java JSTokenTypes.FINALLY_KEYWORD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.FINALLY_KEYWORD属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseTryStatement
protected void parseTryStatement(final PsiBuilder builder)
{
StatementParsing.LOGGER.assertTrue(builder.getTokenType() == JSTokenTypes.TRY_KEYWORD);
final PsiBuilder.Marker statement = builder.mark();
builder.advanceLexer();
parseBlock(builder);
while(builder.getTokenType() == JSTokenTypes.CATCH_KEYWORD)
{
parseCatchBlock(builder);
}
if(builder.getTokenType() == JSTokenTypes.FINALLY_KEYWORD)
{
builder.advanceLexer();
parseBlock(builder);
}
statement.done(JSElementTypes.TRY_STATEMENT);
}
示例2: getStatement
@Override
public JSStatement getStatement()
{
ASTNode child = getNode().getFirstChildNode();
while(child != null)
{
final IElementType type = child.getElementType();
if(JSElementTypes.STATEMENTS.contains(type))
{
return (JSStatement) child.getPsi();
}
if(type == JSTokenTypes.FINALLY_KEYWORD)
{
break;
}
child = child.getTreeNext();
}
return null;
}
示例3: getFinallyStatement
@Override
public JSStatement getFinallyStatement()
{
ASTNode child = getNode().getFirstChildNode();
boolean foundFinally = false;
while(child != null)
{
final IElementType type = child.getElementType();
if(foundFinally && JSElementTypes.STATEMENTS.contains(type))
{
return (JSStatement) child.getPsi();
}
if(type == JSTokenTypes.FINALLY_KEYWORD)
{
foundFinally = true;
}
child = child.getTreeNext();
}
return null;
}
示例4: visitTryStatement
@Override
public void visitTryStatement(final ASTNode node)
{
if(type1 == JSTokenTypes.TRY_KEYWORD && type2 == JSElementTypes.BLOCK_STATEMENT)
{
setBraceSpace(mySettings.SPACE_BEFORE_TRY_LBRACE, mySettings.BRACE_STYLE, null);
}
else if(type2 == JSElementTypes.CATCH_BLOCK)
{
setLineBreakSpace(mySettings.CATCH_ON_NEW_LINE);
}
else if(type2 == JSTokenTypes.FINALLY_KEYWORD)
{
setLineBreakSpace(mySettings.FINALLY_ON_NEW_LINE);
}
else if(type1 == JSTokenTypes.FINALLY_KEYWORD)
{
setBraceSpace(mySettings.SPACE_BEFORE_FINALLY_LBRACE, mySettings.BRACE_STYLE, null);
}
}