CPP-3103: Conditionally uncompiled code unexpectedly formatted
[idea/community.git] / platform / lang-impl / src / com / intellij / psi / impl / source / codeStyle / CodeFormatterFacade.java
index f1cf75b4a2febff7a6bf50b81d07afef4fba5cc4..16cf2ef6271e9d2819b567c59474b39c4c2cc93c 100644 (file)
@@ -228,7 +228,7 @@ public class CodeFormatterFacade {
           }
 
           final FormattingModel originalModel = CoreFormatterUtil.buildModel(builder, file, mySettings, FormattingMode.REFORMAT);
-          final FormattingModel model = new DocumentBasedFormattingModel(originalModel.getRootBlock(),
+          final FormattingModel model = new DocumentBasedFormattingModel(originalModel,
                                                                          document,
                                                                          project, mySettings, file.getFileType(), file);