mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
IDEA-155319 "Run inspection by name" should not reuse "Find Action" search pattern
This commit is contained in:
@@ -26,7 +26,6 @@ import com.intellij.ide.util.gotoByName.GotoActionModel;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.ex.ActionUtil;
|
||||
import com.intellij.openapi.actionSystem.ex.QuickList;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.application.TransactionGuard;
|
||||
@@ -46,7 +45,6 @@ import com.intellij.openapi.ui.popup.ListPopup;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -75,6 +73,10 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
|
||||
GotoActionCallback<Object> callback = new GotoActionCallback<Object>() {
|
||||
@Override
|
||||
public void elementChosen(@NotNull ChooseByNamePopup popup, @NotNull Object element) {
|
||||
if (project != null) {
|
||||
// if the chosen action displays another popup, don't populate it automatically with the text from this popup
|
||||
project.putUserData(ChooseByNamePopup.CHOOSE_BY_NAME_POPUP_IN_PROJECT_KEY, null);
|
||||
}
|
||||
String enteredText = popup.getTrimmedText();
|
||||
openOptionOrPerformAction(((GotoActionModel.MatchedValue)element).value, enteredText, project, component, e);
|
||||
}
|
||||
|
||||
@@ -210,6 +210,10 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
return;
|
||||
}
|
||||
|
||||
if (myActionListener != null && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
myActionListener.onClose();
|
||||
}
|
||||
|
||||
if (isOk) {
|
||||
myModel.saveInitialCheckBoxState(myCheckBox.isSelected());
|
||||
|
||||
@@ -261,10 +265,6 @@ public class ChooseByNamePopup extends ChooseByNameBase implements ChooseByNameP
|
||||
}
|
||||
|
||||
cleanupUI(isOk);
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) return;
|
||||
if (myActionListener != null) {
|
||||
myActionListener.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanupUI(boolean ok) {
|
||||
|
||||
Reference in New Issue
Block a user