private List<? extends PsiElement> getCompletionContexts() {
    List<PsiElement> result = new ArrayList<>();

    ContainerUtil.addIfNotNull(result, getCompletionContext());

    List<String> imports = JavaClassReferenceProvider.IMPORTS.getValue(getOptions());
    if (imports != null && getContextReference() == null) {
      result.addAll(ContainerUtil.mapNotNull(imports, JavaPsiFacade.getInstance(getElement().getProject())::findPackage));
    }

    return result;
  }
private List<? extends PsiElement> getCompletionContexts()