FormattingModel (@NotNull FormattingContext formattingContext) { final PsiFile psiFile = formattingContext.getContainingFile(); final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(psiFile); return new XmlFormattingModel( psiFile, new XmlBlock(SourceTreeToPsiMap.psiElementToTree(psiFile), null, null, new HtmlPolicy(formattingContext.getCodeStyleSettings(), documentModel), null, null, false), documentModel); }