From 296b2c1f4777dc5c48d030bcce1a68d5548c4c40 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 27 Aug 2010 19:22:45 +0400 Subject: [PATCH] choose by name popups are not modal context --- .../com/intellij/ide/util/gotoByName/ChooseByNameBase.java | 3 +-- .../com/intellij/ide/util/gotoByName/ChooseByNamePopup.java | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 0f42cffeab5f..a965e5e9d9a3 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -62,7 +62,6 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import javax.swing.border.EmptyBorder; -import javax.swing.border.LineBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -597,7 +596,7 @@ public abstract class ChooseByNameBase { close(false); return Boolean.TRUE; } - }).setFocusable(true).setRequestFocus(true).setForceHeavyweight(true); + }).setFocusable(true).setRequestFocus(true).setForceHeavyweight(true).setModalContext(false); Point point = new Point(x, y); SwingUtilities.convertPointToScreen(point, layeredPane); diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNamePopup.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNamePopup.java index f0ae29937990..9494515e0131 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNamePopup.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNamePopup.java @@ -24,9 +24,7 @@ import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.SystemInfo; -import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; -import com.intellij.openapi.wm.ex.LayoutFocusTraversalPolicyExt; import com.intellij.psi.PsiElement; import com.intellij.psi.statistics.StatisticsInfo; import com.intellij.psi.statistics.StatisticsManager; @@ -101,7 +99,7 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP myListScrollPane.setBorder(null); if (myDropdownPopup == null) { ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(myListScrollPane, myListScrollPane); - builder.setFocusable(false).setRequestFocus(false).setCancelKeyEnabled(false).setFocusOwners(new JComponent[] {myTextField}).setBelongsToGlobalPopupStack(false).setForceHeavyweight(true); + builder.setFocusable(false).setRequestFocus(false).setCancelKeyEnabled(false).setFocusOwners(new JComponent[] {myTextField}).setBelongsToGlobalPopupStack(false).setForceHeavyweight(true).setModalContext(false); builder.setCancelCallback(new Computable() { @Override public Boolean compute() {