InjectedFileViewProvider (@NotNull PsiManagerEx manager, @NotNull VirtualFileWindowImpl file, @NotNull DocumentWindowImpl window, @NotNull Language language) { AbstractFileViewProvider original = (AbstractFileViewProvider)manager.getFileManager().createFileViewProvider(file, false); return original instanceof TemplateLanguageFileViewProvider ? new MultipleRootsInjectedFileViewProvider.Template(manager, file, window, language, original) : original instanceof MultiplePsiFilesPerDocumentFileViewProvider ? new MultipleRootsInjectedFileViewProvider(manager, file, window, language, original) : new SingleRootInjectedFileViewProvider(manager, file, window, language); }