public FormattingModel createModel(PsiElement element, CodeStyleSettings settings) {
final PsiFile file = element.getContainingFile();
final FileElement fileElement = TreeUtil.getFileElement((TreeElement)SourceTreeToPsiMap.psiElementToTree(element));
final GherkinBlock rootBlock = new GherkinBlock(fileElement);
//FormattingModelDumper.dumpFormattingModel(rootBlock, 0, System.out);
return new PsiBasedFormattingModel(file, rootBlock, FormattingDocumentModelImpl.createOn(file));
}