private static boolean invoke(@NotNull Project project, Editor editor, PsiTypeElement typeElement, PsiElement parent) {
    PsiElement[] toMigrate = null;
    if (parent instanceof PsiVariable) {
      toMigrate = extractReferencedVariables(typeElement);
    }
    else if ((parent instanceof PsiMember && !(parent instanceof PsiClass)) || isClassArgument(parent)) {
      toMigrate = new PsiElement[]{parent};
    }
    if (toMigrate != null && toMigrate.length > 0) {
      invoke(project, toMigrate, editor);
      return true;
    }
    return false;
  }
private static boolean invoke(@NotNull Project project, Editor editor, PsiTypeElement typeElement, PsiElement parent)