void (@NotNull final CompletionParameters parameters, @NotNull final ProcessingContext context, @NotNull final CompletionResultSet result) { final PsiElement element = parameters.getPosition(); final Set<PsiClass> throwsSet = new HashSet<>(); final PsiMethod method = PsiTreeUtil.getContextOfType(element, PsiMethod.class, true); if (method != null) { for (PsiClassType ref : method.getThrowsList().getReferencedTypes()) { final PsiClass exception = ref.resolve(); if (exception != null && throwsSet.add(exception)) { result.addElement( TailTypeDecorator.withTail(new JavaPsiClassReferenceElement(exception), TailTypes.humbleSpaceBeforeWordType())); } } } }