more stable lookup position

This commit is contained in:
peter.gromov
2010-10-21 19:42:31 +04:00
parent c4dd942950
commit a3a06b1bce
2 changed files with 2 additions and 8 deletions
@@ -199,7 +199,6 @@ public class CodeCompletionHandlerBase implements CodeInsightActionHandler {
LookupImpl lookup = (LookupImpl)LookupManager.getInstance(editor.getProject()).createLookup(editor, LookupElement.EMPTY_ARRAY, "", LookupArranger.DEFAULT);
if (editor.isOneLineMode()) {
lookup.setForceShowAsPopup(true);
lookup.setCancelOnClickOutside(true);
lookup.setCancelOnOtherWindowOpen(true);
lookup.setResizable(false);
@@ -550,13 +550,6 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable {
return myLookupStartMarker.getStartOffset();
}
@Override
protected void beforeShow() {
if (isRealPopup()) {
getComponent().setBorder(null);
}
}
public void performGuardedChange(Runnable change) {
assert !myChangeGuard;
myChangeGuard = true;
@@ -648,6 +641,8 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable {
if (ApplicationManager.getApplication().isUnitTestMode()) return;
getComponent().setBorder(null);
Point p = calculatePosition();
HintManagerImpl hintManager = HintManagerImpl.getInstanceImpl();
hintManager.showEditorHint(this, myEditor, p, HintManagerImpl.HIDE_BY_ESCAPE | HintManagerImpl.UPDATE_BY_SCROLLING, 0, false);