[ui] giving "show file path" action a popup-friendly name in bookmarks (IDEA-314401)

GitOrigin-RevId: adb8addff266a27ad570e2423f41e8a1b60c5fec
This commit is contained in:
Roman Shevchenko
2023-03-10 09:31:58 +01:00
committed by intellij-monorepo-bot
parent 5d1bd4aa02
commit 36f3540a2d

View File

@@ -48,7 +48,7 @@ public class ShowFilePathAction extends DumbAwareAction {
if (visible) {
var file = getFile(e);
e.getPresentation().setEnabled(file != null);
var isPopup = ActionPlaces.PROJECT_VIEW_POPUP.equals(e.getPlace()) || ActionPlaces.EDITOR_TAB_POPUP.equals(e.getPlace());
var isPopup = List.of(ActionPlaces.PROJECT_VIEW_POPUP, ActionPlaces.EDITOR_TAB_POPUP, ActionPlaces.BOOKMARKS_VIEW_POPUP).contains(e.getPlace());
e.getPresentation().setText(ActionsBundle.message(isPopup ? "action.ShowFilePath.popup" : "action.ShowFilePath.text"));
}
}