mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[shelf]: IDEA-149652 fix text for option Show/Hide Already Unshelved: keep action text in Context menu and change it in the toolbar according to the state.
This commit is contained in:
+3
-2
@@ -32,9 +32,10 @@ public class ShowHideRecycledAction extends ToggleAction implements DumbAware {
|
||||
final Presentation presentation = e.getPresentation();
|
||||
presentation.setEnabledAndVisible(project != null);
|
||||
if (project != null) {
|
||||
presentation.setText(ShelveChangesManager.getInstance(project).isShowRecycled() ?
|
||||
final boolean fromContextMenu = ShelvedChangesViewManager.SHELF_CONTEXT_MENU.equals(e.getPlace());
|
||||
presentation.setText(ShelveChangesManager.getInstance(project).isShowRecycled() && !fromContextMenu ?
|
||||
"Hide Already Unshelved" : "Show Already Unshelved");
|
||||
presentation.setIcon(ShelvedChangesViewManager.SHELF_CONTEXT_MENU.equals(e.getPlace()) ? null : AllIcons.Nodes.DisabledPointcut);
|
||||
presentation.setIcon(fromContextMenu ? null : AllIcons.Nodes.DisabledPointcut);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user