void (@NotNull Document doc) { PostprocessReformattingAspect component = PostprocessReformattingAspect.getInstance(myProject); FileViewProvider viewProvider; if (doc instanceof DocumentWindow) { Document topDoc = ((DocumentWindow)doc).getDelegate(); FileViewProvider topViewProvider = getCachedViewProvider(topDoc); if (topViewProvider != null && InjectionUtils.shouldFormatOnlyInjectedCode(topViewProvider)) { viewProvider = getCachedViewProvider(doc); } else { viewProvider = topViewProvider; } } else { viewProvider = getCachedViewProvider(doc); } if (viewProvider != null && component != null) { component.doPostponedFormatting(viewProvider); } }