Search in sources :

Example 1 with InspectionFilterAction

use of com.intellij.profile.codeInspection.ui.filter.InspectionFilterAction in project intellij-community by JetBrains.

the class SingleInspectionProfilePanel method createTreeToolbarPanel.

private ActionToolbar createTreeToolbarPanel() {
    final CommonActionsManager actionManager = CommonActionsManager.getInstance();
    DefaultActionGroup actions = new DefaultActionGroup();
    actions.add(new InspectionFilterAction(myProfile, myInspectionsFilter, myProjectProfileManager.getProject(), myProfileFilter));
    actions.addSeparator();
    actions.add(actionManager.createExpandAllAction(myTreeExpander, myTreeTable));
    actions.add(actionManager.createCollapseAllAction(myTreeExpander, myTreeTable));
    actions.add(new DumbAwareAction("Reset to Empty", "Reset to empty", AllIcons.Actions.Reset_to_empty) {

        @Override
        public void update(@NotNull AnActionEvent e) {
            e.getPresentation().setEnabled(myProfile != null && myProfile.isExecutable(myProjectProfileManager.getProject()));
        }

        @Override
        public void actionPerformed(@NotNull AnActionEvent e) {
            myProfile.resetToEmpty(myProjectProfileManager.getProject());
            loadDescriptorsConfigs(false);
            postProcessModification();
        }
    });
    final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, actions, true);
    actionToolbar.setTargetComponent(this);
    return actionToolbar;
}
Also used : InspectionFilterAction(com.intellij.profile.codeInspection.ui.filter.InspectionFilterAction) DumbAwareAction(com.intellij.openapi.project.DumbAwareAction)

Aggregations

DumbAwareAction (com.intellij.openapi.project.DumbAwareAction)1 InspectionFilterAction (com.intellij.profile.codeInspection.ui.filter.InspectionFilterAction)1