ensure scrolling finished before popup is shown

This commit is contained in:
Anna Kozlova
2014-05-21 12:02:18 +04:00
parent 16767798f2
commit 607732e0f3
@@ -109,10 +109,15 @@ public class ExternalAnnotationsLineMarkerProvider implements LineMarkerProvider
}
}
if (group.getChildrenCount() > 0) {
JBPopupFactory.getInstance()
.createActionGroupPopup(null, group, SimpleDataContext.getProjectContext(null),
JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true)
.showInBestPositionFor(editor);
editor.getScrollingModel().runActionOnScrollingFinished(new Runnable() {
@Override
public void run() {
JBPopupFactory.getInstance()
.createActionGroupPopup(null, group, SimpleDataContext.getProjectContext(null),
JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true)
.showInBestPositionFor(editor);
}
});
}
}
}