@NotNull final RelativePoint popupPosition,
final int maxUsages,
@NotNull final FindUsagesOptions options) {
usage.navigate(true);
if (hint == null) return;
final Editor newEditor = getEditorFor(usage);
if (newEditor == null) return;
final Project project = handler.getProject();
//opening editor is performing in invokeLater
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(new Runnable() {
@Override
public void run() {
newEditor.getScrollingModel().runActionOnScrollingFinished(new Runnable() {
@Override
public void run() {
// after new editor created, some editor resizing events are still bubbling. To prevent hiding hint, invokeLater this
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(new Runnable() {
@Override
public void run() {
if (newEditor.getComponent().isShowing()) {
showHint(hint, newEditor, popupPosition, handler, maxUsages, options);
}
}
});
}