void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; FindInProjectSettings findInProjectSettings = FindInProjectSettings.getInstance(project); String[] recent = mySearchMode ? findInProjectSettings.getRecentFindStrings() : findInProjectSettings.getRecentReplaceStrings(); JBList<String> historyList = new JBList<>(ArrayUtil.reverseArray(recent)); Dimension size = historyList.getPreferredSize(); size.width = Math.min(size.width, getWidth() + 200); historyList.setPreferredSize(size); historyList.getAccessibleContext() .setAccessibleName(FindBundle.message(mySearchMode ? "find.search.history" : "find.replace.history")); Utils.showCompletionPopup(SearchTextArea.this, historyList, null, myTextArea, null); }