private static Processor<PsiLanguageInjectionHost> getAnnotationFixer(@NotNull final Project project,
                                                                        @NotNull final String languageId) {
    return host -> {
      if (host == null) return false;

      final Configuration.AdvancedConfiguration configuration = Configuration.getProjectInstance(project).getAdvancedConfiguration();
      boolean allowed = configuration.isSourceModificationAllowed();
      configuration.setSourceModificationAllowed(true);
      try {
        return doInject(languageId, host, host);
      }
      finally {
        configuration.setSourceModificationAllowed(allowed);
      }
    };
  }
private static Processor<PsiLanguageInjectionHost> getAnnotationFixer(@NotNull final Project project,
                                                                        @NotNull final String languageId)