Package com.intellij.formatting

Examples of com.intellij.formatting.Indent


        if (psiElement.getParent() instanceof DBLanguageFile) {
            return Indent.getAbsoluteNoneIndent();
        }

        Indent indent = getIndentAttribute();
        if (indent == null) {
            if (psiElement instanceof BasePsiElement) {
                BasePsiElement basePsiElement = (BasePsiElement) psiElement;
                BasePsiElement parentPsiElement = getParentPsiElement(basePsiElement);
                if (parentPsiElement != null && parentPsiElement.getElementType() instanceof WrapperElementType) {
View Full Code Here


    }
   
    public FormattingAttributes getAttributes() {
        if (attributes == null) {
            Wrap wrap = this.wrap == null ? null : this.wrap.getValue();
            Indent indent = this.indent == null ? null : this.indent.getValue();
            Spacing spacingBefore = this.spacingBefore == null ? null : this.spacingBefore.getValue();
            Spacing spacingAfter = this.spacingAfter == null ? null : this.spacingAfter.getValue();
            attributes = new FormattingAttributes(wrap, indent, spacingBefore, spacingAfter);
        }
        return attributes;
View Full Code Here

    @Override
    protected List<Block> buildChildren() {
        List<Block> children = new ArrayList<Block>();
        for (ASTNode child : getGoChildren()) {
            Block block;
            Indent indent = Indent.getNormalIndent();
            if (isWhiteSpaceNode(child.getPsi())) {
                continue;
            }

            if (child.getElementType() == GoElementTypes.oASSIGN) {
View Full Code Here

            if (isNewLineNode(child.getPsi()) || isWhiteSpaceNode(child.getPsi())) {
                continue;
            }

            Block block;
            Indent indent = Indent.getNormalIndent();
            if (FIELD_TYPE_SET.contains(child.getElementType())) {
                block = GoBlockGenerator.generateBlock(child, indent, fieldTypeAlignment, mySettings);
            } else {
                block = GoBlockGenerator.generateBlock(child, indent, mySettings);
            }
View Full Code Here

      if (canBeCorrectBlock(childNode)) {

        final PsiElement childPsi = childNode.getPsi();
        final boolean mustAlign = mustAlign(blockPsi, childPsi, clSettings);

        final Indent indent = ClojureIndentProcessor.getChildIndent(myBlock, prevChildNode, childNode);
        subBlocks.add(new ClojureBlock(childNode,
            mustAlign ? block.childAlignment : Alignment.createAlignment(),
            indent, myWrap, mySettings));
        prevChildNode = childNode;
View Full Code Here

TOP

Related Classes of com.intellij.formatting.Indent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.