@Override
  public Object @NotNull [] getVariants() {
    List<Object> result = new ArrayList<>();
    for (PsiElement context : getCompletionContexts()) {
      if (context instanceof PsiPackage) {
        result.addAll(processPackage((PsiPackage)context));
      }
      else if (context instanceof PsiClass) {
        if (myInStaticImport) {
          Collections.addAll(result, ((PsiClass)context).getInnerClasses());
          Collections.addAll(result, ((PsiClass)context).getFields());
        }
        else if (isDefinitelyStatic()) {
          result.addAll(ContainerUtil.filter(((PsiClass)context).getInnerClasses(), c -> c.hasModifierProperty(PsiModifier.STATIC)));
        }
      }
    }
    return result.toArray();
  }
@Override
  public Object @NotNull [] getVariants()