Java 类com.intellij.psi.formatter.xml.HtmlPolicy 实例源码

项目:bamboo-soy    文件:SoyFormattingModelBuilder.java   
@Override
public TemplateLanguageBlock createTemplateLanguageBlock(
    @NotNull ASTNode node,
    @Nullable Wrap wrap,
    @Nullable Alignment alignment,
    @Nullable List<DataLanguageBlockWrapper> foreignChildren,
    @NotNull CodeStyleSettings codeStyleSettings) {
  final FormattingDocumentModelImpl documentModel =
      FormattingDocumentModelImpl.createOn(node.getPsi().getContainingFile());
  if (node.getPsi() instanceof TagElement) {
    return new SoyTagBlock(
        this,
        codeStyleSettings,
        node,
        foreignChildren,
        new HtmlPolicy(codeStyleSettings, documentModel));
  } else if(node.getPsi() instanceof TagBlockElement) {
    return new SoyTagBlockBlock(
        this,
        codeStyleSettings,
        node,
        foreignChildren,
        new HtmlPolicy(codeStyleSettings, documentModel));
  } else if (node.getPsi() instanceof SoyStatementList) {
    return new SoyStatementListBlock(
        this,
        codeStyleSettings,
        node,
        foreignChildren,
        new HtmlPolicy(codeStyleSettings, documentModel));
  } else {
    return new SoyBlock(
      this,
      codeStyleSettings,
      node,
      foreignChildren,
      new HtmlPolicy(codeStyleSettings, documentModel));
  }
}
项目:bamboo-soy    文件:SoyStatementListBlock.java   
public SoyStatementListBlock(
    @NotNull TemplateLanguageBlockFactory blockFactory,
    @NotNull CodeStyleSettings settings,
    @NotNull ASTNode node,
    @Nullable List<DataLanguageBlockWrapper> foreignChildren,
    HtmlPolicy htmlPolicy) {
  super(blockFactory, settings, node, foreignChildren, htmlPolicy);
}
项目:bamboo-soy    文件:SoyBlock.java   
public SoyBlock(
    @NotNull TemplateLanguageBlockFactory blockFactory,
    @NotNull CodeStyleSettings settings,
    @NotNull ASTNode node,
    @Nullable List<DataLanguageBlockWrapper> foreignChildren,
    HtmlPolicy htmlPolicy) {
  super(blockFactory, settings, node, foreignChildren);
  myHtmlPolicy = htmlPolicy;
}
项目:bamboo-soy    文件:SoyTagBlock.java   
public SoyTagBlock(
    @NotNull TemplateLanguageBlockFactory blockFactory,
    @NotNull CodeStyleSettings settings,
    @NotNull ASTNode node,
    @Nullable List<DataLanguageBlockWrapper> foreignChildren,
    HtmlPolicy htmlPolicy) {
  super(blockFactory, settings, node, foreignChildren, htmlPolicy);
}
项目:bamboo-soy    文件:SoyTagBlockBlock.java   
public SoyTagBlockBlock(
    @NotNull TemplateLanguageBlockFactory blockFactory,
    @NotNull CodeStyleSettings settings,
    @NotNull ASTNode node,
    @Nullable List<DataLanguageBlockWrapper> foreignChildren,
    HtmlPolicy htmlPolicy) {
  super(blockFactory, settings, node, foreignChildren, htmlPolicy);
}
项目:intellij-ce-playground    文件:XhtmlFormattingModelBuilder.java   
@Override
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                          new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                       null, null,
                                                                       new HtmlPolicy(settings, documentModel), null, null, false),
                                                          documentModel);
}
项目:intellij-ce-playground    文件:HtmlFormattingModelBuilder.java   
@Override
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                         new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                      null, null, new HtmlPolicy(settings, documentModel), null, null, false),
                                                         documentModel);
}
项目:tools-idea    文件:XhtmlFormattingModelBuilder.java   
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                          new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                       null, null,
                                                                       new HtmlPolicy(settings, documentModel), null, null, false),
                                                          documentModel);
}
项目:tools-idea    文件:HtmlFormattingModelBuilder.java   
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                         new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                      null, null, new HtmlPolicy(settings, documentModel), null, null, false),
                                                         documentModel);
}
项目:consulo-xml    文件:XhtmlFormattingModelBuilder.java   
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                          new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                       null, null,
                                                                       new HtmlPolicy(settings, documentModel), null, null, false),
                                                          documentModel);
}
项目:consulo-xml    文件:HtmlFormattingModelBuilder.java   
@NotNull
  public FormattingModel createModel(final PsiElement element, final CodeStyleSettings settings) {
  final PsiFile psiFile = element.getContainingFile();
  final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile);
  return new XmlFormattingModel(psiFile,
                                                         new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile),
                                                                      null, null, new HtmlPolicy(settings, documentModel), null, null, false),
                                                         documentModel);
}