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;
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;
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);
}
return;
}
+ if (myActionListener != null && !ApplicationManager.getApplication().isUnitTestMode()) {
+ myActionListener.onClose();
+ }
+
if (isOk) {
myModel.saveInitialCheckBoxState(myCheckBox.isSelected());
}
cleanupUI(isOk);
- if (ApplicationManager.getApplication().isUnitTestMode()) return;
- if (myActionListener != null) {
- myActionListener.onClose();
- }
}
private void cleanupUI(boolean ok) {