proper quick doc pop placement on second and subsequent invokations (when changing selected item in completion lookup with autopopup quickdoc option on)

This commit is contained in:
Maxim.Mossienko
2010-04-22 20:35:22 +04:00
parent 65784c27fb
commit 51dd78ddcf
@@ -316,6 +316,12 @@ public class DocumentationManager {
component.setHint(hint);
if (myEditor == null) {
// subsequent invocation of javadoc popup from completion will have myEditor == null because of cancel invoked,
// so reevaluate the editor for proper popup placement
Lookup lookup = LookupManager.getInstance(myProject).getActiveLookup();
myEditor = lookup != null ? lookup.getEditor() : null;
}
fetchDocInfo(getDefaultCollector(element, originalElement), component);
myDocInfoHintRef = new WeakReference<JBPopup>(hint);