mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid "add import" popup leaks in tests
This commit is contained in:
+1
-1
@@ -159,8 +159,8 @@ public class AddImportAction implements QuestionAction {
|
||||
};
|
||||
}
|
||||
};
|
||||
popup.showInBestPositionFor(myEditor);
|
||||
NavigationUtil.hidePopupIfDumbModeStarts(popup, myProject);
|
||||
popup.showInBestPositionFor(myEditor);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.ui.popup.*;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.statistics.StatisticsInfo;
|
||||
import com.intellij.psi.statistics.StatisticsManager;
|
||||
@@ -646,6 +647,9 @@ public class ListPopupImpl extends WizardPopup implements ListPopup {
|
||||
public void showInBestPositionFor(@NotNull Editor editor) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
handleSelect(true);
|
||||
if (!Disposer.isDisposed(this)) {
|
||||
Disposer.dispose(this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
super.showInBestPositionFor(editor);
|
||||
|
||||
Reference in New Issue
Block a user