@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)); } }
public SoyStatementListBlock( @NotNull TemplateLanguageBlockFactory blockFactory, @NotNull CodeStyleSettings settings, @NotNull ASTNode node, @Nullable List<DataLanguageBlockWrapper> foreignChildren, HtmlPolicy htmlPolicy) { super(blockFactory, settings, node, foreignChildren, htmlPolicy); }
public SoyBlock( @NotNull TemplateLanguageBlockFactory blockFactory, @NotNull CodeStyleSettings settings, @NotNull ASTNode node, @Nullable List<DataLanguageBlockWrapper> foreignChildren, HtmlPolicy htmlPolicy) { super(blockFactory, settings, node, foreignChildren); myHtmlPolicy = htmlPolicy; }
public SoyTagBlock( @NotNull TemplateLanguageBlockFactory blockFactory, @NotNull CodeStyleSettings settings, @NotNull ASTNode node, @Nullable List<DataLanguageBlockWrapper> foreignChildren, HtmlPolicy htmlPolicy) { super(blockFactory, settings, node, foreignChildren, htmlPolicy); }
public SoyTagBlockBlock( @NotNull TemplateLanguageBlockFactory blockFactory, @NotNull CodeStyleSettings settings, @NotNull ASTNode node, @Nullable List<DataLanguageBlockWrapper> foreignChildren, HtmlPolicy htmlPolicy) { super(blockFactory, settings, node, foreignChildren, htmlPolicy); }
@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); }
@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); }