private void performTypeMigration(List<? extends PsiElement> elements, List<PsiType> types) {
      if (!FileModificationService.getInstance().preparePsiElementsForWrite(elements)) return;
      final Project project = elements.get(0).getProject();
      final TypeMigrationRules rules = new TypeMigrationRules(project);
      rules.setBoundScope(GlobalSearchScopesCore.projectProductionScope(project)
                            .union(GlobalSearchScopesCore.projectTestScope(project)));
      rules.addConversionRuleSettings(new GuavaConversionSettings(ignoreJavaxNullable));
      TypeMigrationProcessor.runHighlightingTypeMigration(project,
                                                          null,
                                                          rules,
                                                          elements.toArray(PsiElement.EMPTY_ARRAY),
                                                          createMigrationTypeFunction(elements, types),
                                                          true,
                                                          true);
    }
private void performTypeMigration(List<? extends PsiElement> elements, List<PsiType> types)