Examples of Indent


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

Examples of com.intellij.formatting.Indent

    }
   
    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

Examples of com.intellij.formatting.Indent

    @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

Examples of com.intellij.formatting.Indent

            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

Examples of com.intellij.formatting.Indent

      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

Examples of org.docx4j.model.properties.paragraph.Indent

             
              // Indent (setting provisional-distance-between-starts)
              // Indent on direct pPr trumps indent in pPr in numbering, which trumps indent
            // specified in a style.  Well, not exactly, components which aren't set in
              // the direct formatting will be contributed by the numbering's indent settings
              Indent indent = new Indent(pPrDirect.getInd(), triple.getIndent());
              if (indent.isHanging() ) {
              indent.setXslFOListBlock(foListBlock, -1);               
              } else {
               
                int numWidth = 90 * numChars; // crude .. TODO take font size into account
               
                  int pdbs = getDistanceToNextTabStop(context, indent.getNumberPosition(), numWidth,
                      pPrDirect.getTabs(), context.getWmlPackage().getMainDocumentPart().getDocumentSettingsPart());
              indent.setXslFOListBlock(foListBlock, pdbs);                               
              }
            indentHandledByNumbering = true;
             
//              // Set the font
//              if (triple.getNumFont()!=null) {
View Full Code Here

Examples of org.docx4j.model.properties.paragraph.Indent

          Ind numInd = org.docx4j.model.listnumbering.Emulator.getInd(
                context.getWmlPackage(), pStyleVal,
                pPr.getNumPr().getNumId().getVal().toString(),
                pPr.getNumPr().getIlvl().getVal().toString() );
          if (numInd!=null) {
                Indent indent = new Indent(pPr.getInd(), numInd);
                pPr.setInd((Ind)indent.getObject());           
          }
        }
       
        StringBuilder inlineStyle =  new StringBuilder();
        HtmlCssHelper.createCss(context.getWmlPackage(), pPr, inlineStyle, ignoreBorders);       
View Full Code Here

Examples of org.docx4j.model.properties.paragraph.Indent

       
            // Indent (setting provisional-distance-between-starts)
            // Indent on direct pPr trumps indent in pPr in numbering, which trumps indent
          // specified in a style.  Well, not exactly, components which aren't set in
            // the direct formatting will be contributed by the numbering's indent settings
            Indent indent = new Indent(pPrDirect.getInd(), triple.getIndent());
            if (indent.isHanging() ) {
            indent.setXslFOListBlock(foListBlock, -1);               
            } else {
             
              int numWidth = 90 * numChars; // crude .. TODO take font size into account
             
                int pdbs = XsltFOFunctions.getDistanceToNextTabStop(conversionContext, indent.getNumberPosition(), numWidth,
                    pPrDirect.getTabs(), conversionContext.getWmlPackage().getMainDocumentPart().getDocumentSettingsPart());
            indent.setXslFOListBlock(foListBlock, pdbs);                               
            }
        indentHandledByNumbering = true;        
               
        foBlockElement = document.createElementNS(XSL_FO,
            "block");
View Full Code Here

Examples of org.docx4j.model.properties.paragraph.Indent

//    if (pPr.getKinsoku() != null)
//      dest.setKinsoku(pPr.getKinsoku());
//    if (pPr.getMirrorIndents() != null)
//      dest.setMirrorIndents(pPr.getMirrorIndents());
   
    Indent indent = null;
    if (pPr.getNumPr() == null) {
      log.debug("No numPr.. ") ;                  
    } else {
      // Numbering is mostly handled directly in the HTML & PDF stylesheets     
      properties.add(new NumberingProperty(pPr.getNumPr()));
    }
   
    if (pPr.getInd() != null) {
      log.debug("Indent from ppr: " + XmlUtils.marshaltoString(pPr.getInd(),  true, true)) ;
      properties.add(new Indent(pPr.getInd()));     
    }
   
    if (pPr.getOutlineLvl() != null)
      properties.add(new OutlineLevel(pPr.getOutlineLvl()));
   
View Full Code Here

Examples of org.docx4j.model.properties.paragraph.Indent

      }
     
      // Paragraph properties
      if (name.equals(Indent.CSS_NAME )) {
        // left
        return new Indent(value);
      } else if (name.equals(Justification.CSS_NAME )) {
        // text-align
        return new Justification(value);
      } else if (name.equals(KeepNext.CSS_NAME )) {
        // page-break-after
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.