From fb2acf51b4adfd4e8bd5019557d77229191585e1 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 6 Apr 2011 18:06:28 +0200 Subject: [PATCH] lookup shown assertions & advertiser addon --- .../com/intellij/codeInsight/lookup/impl/LookupImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java index 23113716c227..b06d2e6647e6 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java @@ -159,7 +159,7 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable { getComponent().add(myScrollPane, BorderLayout.NORTH); myScrollPane.setBorder(null); - myAdComponent = new Advertiser(this); + myAdComponent = new Advertiser(); JComponent adComponent = myAdComponent.getAdComponent(); adComponent.setBorder(new EmptyBorder(0, 1, 1, 2 + relevanceSortIcon.getIconWidth())); getComponent().add(adComponent, BorderLayout.SOUTH); @@ -706,12 +706,16 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable { if (ApplicationManager.getApplication().isUnitTestMode()) return; + myAdComponent.showRandomText(); + getComponent().setBorder(null); updateScrollbarVisibility(); Point p = calculatePosition(getComponent()); HintManagerImpl.getInstanceImpl().showEditorHint(this, myEditor, p, HintManagerImpl.HIDE_BY_ESCAPE | HintManagerImpl.UPDATE_BY_SCROLLING, 0, false, HintManagerImpl.createHintHint(myEditor, p, this, HintManager.UNDER).setAwtTooltip(false)); + LOG.assertTrue(isVisible(), "!visible, disposed=" + myDisposed); + LOG.assertTrue(myList.isShowing(), "!showing, disposed=" + myDisposed); final JLayeredPane layeredPane = getComponent().getRootPane().getLayeredPane(); layeredPane.add(myIconPanel, 42, 0);