use of com.intellij.ui.popup.ComponentPopupBuilderImpl in project intellij-community by JetBrains.
the class CodeInsightTestUtil method gotoImplementation.
@NotNull
@TestOnly
public static GotoTargetHandler.GotoData gotoImplementation(Editor editor, PsiFile file) {
GotoTargetHandler.GotoData data = new GotoImplementationHandler().getSourceAndTargetElements(editor, file);
if (data.listUpdaterTask != null) {
JBList list = new JBList();
CollectionListModel model = new CollectionListModel(new ArrayList());
list.setModel(model);
list.setModel(new NameFilteringListModel(list, Function.ID, Condition.FALSE, String::new));
JBPopup popup = new ComponentPopupBuilderImpl(list, null).createPopup();
data.listUpdaterTask.init((AbstractPopup) popup, list, new Ref<>());
data.listUpdaterTask.queue();
try {
while (!data.listUpdaterTask.isFinished()) {
UIUtil.dispatchAllInvocationEvents();
}
} finally {
Disposer.dispose(popup);
}
}
return data;
}
Aggregations