FormattingModel (@NotNull FormattingContext formattingContext) { final ASTNode root = TreeUtil.getFileElement((TreeElement)SourceTreeToPsiMap.psiElementToTree(formattingContext.getPsiElement())); PsiFile containingFile = formattingContext.getContainingFile(); final FormattingDocumentModelImpl documentModel = FormattingDocumentModelImpl.createOn(containingFile); return new PsiBasedFormattingModel(containingFile, new PropertiesRootBlock(root, formattingContext.getCodeStyleSettings()), documentModel); }