use of com.intellij.codeInsight.hint.api.impls.AnnotationParameterInfoHandler in project intellij-community by JetBrains.
the class ParameterInfoTest method annoParameterPresentation.
private String annoParameterPresentation() {
AnnotationParameterInfoHandler handler = new AnnotationParameterInfoHandler();
CreateParameterInfoContext context = new MockCreateParameterInfoContext(getEditor(), getFile());
PsiAnnotationParameterList list = handler.findElementForParameterInfo(context);
assertNotNull(list);
Object[] itemsToShow = context.getItemsToShow();
assertNotNull(itemsToShow);
assertEquals(1, itemsToShow.length);
assertTrue(itemsToShow[0] instanceof PsiAnnotationMethod);
PsiAnnotationMethod method = (PsiAnnotationMethod) itemsToShow[0];
ParameterInfoUIContextEx parameterContext = ParameterInfoComponent.createContext(itemsToShow, getEditor(), handler, -1);
return AnnotationParameterInfoHandler.updateUIText(method, parameterContext);
}
Aggregations