Package com.intellij.formatting

Examples of com.intellij.formatting.Spacing


        if (leftPsiElement instanceof PsiComment || rightPsiElement instanceof PsiComment) {
            return null;
        }

        Spacing spacingAfter = leftBlock.getSpacingAfterAttribute();
        if (spacingAfter != null) {
            return spacingAfter;
        }

        Spacing spacingBefore = rightBlock.getSpacingBeforeAttribute();
        if (spacingBefore != null) {
            return spacingBefore;
        }

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

        if (child1ElementType == GoElementTypes.FUNCTION_RESULT) {
            return BASIC_SPACING;
        }

        Spacing spacing = super.getGoBlockSpacing(child1, child2);
        if (spacing != null) {
            return spacing;
        }

        return EMPTY_SPACING;
View Full Code Here

    ASTNode node2 = block2.getNode();

    IElementType type1 = node1.getElementType();
    IElementType type2 = node2.getElementType();

    final Spacing psiBased = psiBasedSpacing(node1.getPsi(), node2.getPsi());
    if (psiBased != null) {
      return psiBased;
    }

    if (MODIFIERS.contains(type1)) {
View Full Code Here

TOP

Related Classes of com.intellij.formatting.Spacing

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.