@Override
  public @NotNull String getType(@NotNull PsiElement element) {
    if (element instanceof PsiDirectory) {
      return IndexingBundle.message("terms.directory");
    }
    if (element instanceof PsiFile) {
      return IndexingBundle.message("terms.file");
    }
    if (ThrowSearchUtil.isSearchable(element)) {
      return JavaBundle.message("java.terms.exception");
    }
    JavaElementKind kind = JavaElementKind.fromElement(element);
    if (kind != JavaElementKind.UNKNOWN) {
      return kind.subject();
    }

    final String name = TypePresentationService.getService().getTypePresentableName(element.getClass());
    if (name != null) {
      return name;
    }
    return "";
  }
@Override
  public @NotNull String getType(@NotNull PsiElement element)