Search in sources :

Example 1 with ErrorsConfigurable

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

the class EditInspectionToolsSettingsAction method editSettings.

public static boolean editSettings(final Project project, final InspectionProfileImpl inspectionProfile, final Consumer<ErrorsConfigurable> configurableAction) {
    final ShowSettingsUtil settingsUtil = ShowSettingsUtil.getInstance();
    final ErrorsConfigurable errorsConfigurable = new ProjectInspectionToolsConfigurable(ProjectInspectionProfileManager.getInstance(project)) {

        @Override
        protected boolean setActiveProfileAsDefaultOnApply() {
            return false;
        }

        @Override
        protected InspectionProfileImpl getCurrentProfile() {
            return inspectionProfile;
        }
    };
    return settingsUtil.editConfigurable(project, errorsConfigurable, () -> configurableAction.accept(errorsConfigurable));
}
Also used : ShowSettingsUtil(com.intellij.openapi.options.ShowSettingsUtil) ErrorsConfigurable(com.intellij.profile.codeInspection.ui.ErrorsConfigurable) ProjectInspectionToolsConfigurable(com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable)

Aggregations

ShowSettingsUtil (com.intellij.openapi.options.ShowSettingsUtil)1 ErrorsConfigurable (com.intellij.profile.codeInspection.ui.ErrorsConfigurable)1 ProjectInspectionToolsConfigurable (com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable)1