Commit 960d354c authored by Vassiliy.Kudryashov's avatar Vassiliy.Kudryashov Committed by intellij-monorepo-bot
Browse files

IDEA-241574 Fix empty state text for find popup

IDEA-264313 Find in Files: dots in empty text

(cherry picked from commit 1a5b35e821d3f176a108325d2c1de737b75a78fa)

IJ-CR-7066

GitOrigin-RevId: f792b63c22717824ec8a63fe2c7effc43b075e10
parent 5bf4b5ca
Showing with 9 additions and 5 deletions
+9 -5
......@@ -59,8 +59,9 @@ find.occurrences.search.string=Occurrences of ''{0}''{1, choice,\
4# Everywhere Except Comments|\
5# Everywhere Except Comments and String Literals\
}
message.nothingFound=Nothing found
message.nothingFound.with.problem=Nothing found ({0})
message.nothingFound=Nothing found.
message.nothingFound.with.problem=Nothing found ({0}).
message.type.search.query=Type search query to find in files.
message.nothingFound.used.option=Search option used: {0}
message.nothingFound.used.options=Search options used:
emptyText.used.option={0}
......
......@@ -1336,12 +1336,15 @@ public class FindPopupPanel extends JBPanel<FindPopupPanel> implements FindUI {
myInfoLabel.setText(null);
}
private void showEmptyText(@Nullable String message) {
private void showEmptyText(@Nullable @NlsContexts.StatusText String message) {
StatusText emptyText = myResultsPreviewTable.getEmptyText();
emptyText.clear();
emptyText.setText(message != null ? FindBundle.message("message.nothingFound.with.problem", message)
: FindBundle.message("message.nothingFound"));
FindModel model = myHelper.getModel();
if (StringUtil.isEmpty(model.getStringToFind())) {
emptyText.setText(FindBundle.message("message.type.search.query"));
} else {
emptyText.setText(message != null ? message+"." : FindBundle.message("message.nothingFound"));
}
if (mySelectedScope == FindPopupScopeUIImpl.DIRECTORY && !model.isWithSubdirectories()) {
emptyText.appendSecondaryText(FindBundle.message("find.recursively.hint"),
SimpleTextAttributes.LINK_ATTRIBUTES,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment