public static boolean isDumbOrIncompleteMode(@NotNull PsiElement context) {
    Project project = context.getProject();
    return isDumbOrIncompleteMode(project);
  }
public static boolean isDumbOrIncompleteMode(@NotNull PsiElement context)