当前位置: 首页>>代码示例>>Java>>正文


Java Indent.getContinuationWithoutFirstIndent方法代码示例

本文整理汇总了Java中com.intellij.formatting.Indent.getContinuationWithoutFirstIndent方法的典型用法代码示例。如果您正苦于以下问题:Java Indent.getContinuationWithoutFirstIndent方法的具体用法?Java Indent.getContinuationWithoutFirstIndent怎么用?Java Indent.getContinuationWithoutFirstIndent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.formatting.Indent的用法示例。


在下文中一共展示了Indent.getContinuationWithoutFirstIndent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getChildIndent

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public Indent getChildIndent() {
  PsiElement element = myNode.getPsi();
  if (element instanceof TagBlockElement) {
    return Indent.getNormalIndent();
  } else if (myNode.getPsi() instanceof TagElement) {
    return Indent.getContinuationWithoutFirstIndent();
  } else {
    return Indent.getNoneIndent();
  }
}
 
开发者ID:google,项目名称:bamboo-soy,代码行数:12,代码来源:SoyBlock.java

示例2: createJavaBlocks

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@NotNull
private List<Block> createJavaBlocks(@NotNull final List<ASTNode> subNodes) {
  final ArrayList<Block> result = new ArrayList<Block>();
  for (ASTNode node : subNodes) {
    Indent indent = Indent.getContinuationWithoutFirstIndent(myIndentSettings.USE_RELATIVE_INDENTS);
    result.add(newJavaBlock(node, mySettings, myJavaSettings, indent, null, AlignmentStrategy.getNullStrategy()));
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:CallChunkBlockBuilder.java

示例3: visitCatchClause

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitCatchClause(GrCatchClause catchClause) {
  if (myChild == catchClause.getBody()) {
    myResult = Indent.getNoneIndent();
  }
  else {
    myResult = Indent.getContinuationWithoutFirstIndent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GroovyIndentProcessor.java

示例4: getSubBlocks

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@NotNull
@Override
public List<Block> getSubBlocks() {
  if (mySubBlocks == null) {
    mySubBlocks = new ArrayList<Block>();
    final Indent indent = Indent.getContinuationWithoutFirstIndent();
    mySubBlocks.add(new GroovyBlock(myNameElement.getNode(), indent, Wrap.createWrap(WrapType.NONE, false), myContext));
    new GroovyBlockGenerator(this).addNestedChildrenSuffix(mySubBlocks, null, myTopLevel, myChildren, myChildren.size());
  }
  return mySubBlocks;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:MethodCallWithoutQualifierBlock.java

示例5: visitWhileStatement

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitWhileStatement(GrWhileStatement whileStatement) {
  if (myChild == (whileStatement).getBody() && !TokenSets.BLOCK_SET.contains(myChildType)) {
    myResult = Indent.getNormalIndent();
  }
  else if (myChild == whileStatement.getCondition()) {
    myResult = Indent.getContinuationWithoutFirstIndent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GroovyIndentProcessor.java

示例6: getChildIndent

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
/**
   * Calculates indent, based on code style, between parent block and child node
   *
   * @param parent        parent block
   * @param child         child node
   * @param prevChildNode previous child node
   * @return indent
   */
  @NotNull
  public static Indent getChildIndent(@NotNull final LuaFormattingBlock parent, @Nullable final ASTNode prevChildNode, @NotNull final ASTNode child) {
    ASTNode astNode = parent.getNode();
    final PsiElement psiParent = astNode.getPsi();


//    if (psiParent instanceof LuaAnonymousFunctionExpression)
//        return Indent.getNormalIndent();

    // For Lua Blocks
    if (psiParent instanceof LuaBlock && !(psiParent instanceof LuaPsiFile) && !(psiParent.getParent() instanceof LuaRepeatStatement)) {
        return Indent.getNormalIndent();
    }



    if (psiParent instanceof LuaTableConstructor) {
        if (child.getElementType() == RCURLY)
            return Indent.getNoneIndent();
        if (child.getElementType() == LCURLY)
            return Indent.getContinuationWithoutFirstIndent();

        return Indent.getNormalIndent();
    }


    if ((child.getElementType() == LUADOC_COMMENT || child.getPsi() instanceof PsiComment) && psiParent instanceof LuaStatementElement) {
        return Indent.getNormalIndent();
    }

    if (psiParent.getParent() instanceof LuaFunctionArguments) {
        if (child.getElementType() == RPAREN)
            return Indent.getNoneIndent();
        if (child.getElementType() == LPAREN)
            return Indent.getContinuationWithoutFirstIndent();

        return Indent.getNormalIndent();
    }
    // For common code block
//    if (BLOCK_SET.contains(astNode.getElementType())) {
//      return indentForBlock(psiParent, child);
//    }

    return Indent.getNoneIndent();
  }
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:54,代码来源:LuaIndentProcessor.java

示例7: build

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
public Block build(List<ASTNode> nodes)  {
  List<Block> blocks = buildBlocksFrom(nodes);

  Indent indent = myBlockIndent != null ? myBlockIndent : Indent.getContinuationWithoutFirstIndent(myIndentSettings.USE_RELATIVE_INDENTS);
  return new SyntheticCodeBlock(blocks, myBlockAlignment, mySettings, myJavaSettings, indent, myBlockWrap);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ChainMethodCallsBlockBuilder.java

示例8: visitTypeArgumentList

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitTypeArgumentList(GrTypeArgumentList typeArgumentList) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java

示例9: visitListOrMap

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitListOrMap(GrListOrMap listOrMap) {
  if (myChildType != GroovyTokenTypes.mLBRACK && myChildType != GroovyTokenTypes.mRBRACK) {
    myResult = Indent.getContinuationWithoutFirstIndent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:GroovyIndentProcessor.java

示例10: visitArgumentList

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitArgumentList(GrArgumentList list) {
  if (myChildType != GroovyTokenTypes.mLPAREN && myChildType != GroovyTokenTypes.mRPAREN) {
    myResult = Indent.getContinuationWithoutFirstIndent();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:GroovyIndentProcessor.java

示例11: visitAnnotationNameValuePair

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitAnnotationNameValuePair(GrAnnotationNameValuePair nameValuePair) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java

示例12: visitVariable

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitVariable(GrVariable variable) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java

示例13: visitForClause

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitForClause(GrForClause forClause) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java

示例14: visitArrayDeclaration

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitArrayDeclaration(GrArrayDeclaration arrayDeclaration) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java

示例15: visitAssignmentExpression

import com.intellij.formatting.Indent; //导入方法依赖的package包/类
@Override
public void visitAssignmentExpression(GrAssignmentExpression expression) {
  myResult = Indent.getContinuationWithoutFirstIndent();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GroovyIndentProcessor.java


注:本文中的com.intellij.formatting.Indent.getContinuationWithoutFirstIndent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。