mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
project view: set 'enabled' attribute accordingly with 'visible' for toggle actions
This commit is contained in:
@@ -1830,7 +1830,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
super.update(e);
|
||||
final Presentation presentation = e.getPresentation();
|
||||
AbstractProjectViewPane pane = getCurrentProjectViewPane();
|
||||
presentation.setVisible(pane != null && pane.supportsManualOrder());
|
||||
presentation.setEnabledAndVisible(pane != null && pane.supportsManualOrder());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1876,7 +1876,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
public void update(final AnActionEvent e) {
|
||||
super.update(e);
|
||||
final Presentation presentation = e.getPresentation();
|
||||
presentation.setVisible(getCurrentProjectViewPane() != null);
|
||||
presentation.setEnabledAndVisible(getCurrentProjectViewPane() != null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public class ProjectViewPane extends AbstractProjectViewPSIPane {
|
||||
super.update(e);
|
||||
final Presentation presentation = e.getPresentation();
|
||||
final ProjectView projectView = ProjectView.getInstance(myProject);
|
||||
presentation.setVisible(projectView.getCurrentProjectViewPane() == ProjectViewPane.this);
|
||||
presentation.setEnabledAndVisible(projectView.getCurrentProjectViewPane() == ProjectViewPane.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user