InjectedFileChangesHandler (List<? extends PsiLanguageInjectionHost.Shred> shreds, Editor hostEditor, Document newDocument, PsiFile injectedFile) { if (Registry.is("injections.java.fragment.editor.new") && !hasBlockLiterals(shreds) && !hasSnippet(shreds)) { return new JavaInjectedFileChangesHandler(shreds, hostEditor, newDocument, injectedFile); } else { return new OldJavaInjectedFileChangesHandler(shreds, hostEditor, newDocument, injectedFile); } }