use of com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable in project intellij-community by JetBrains.
the class EditCleanupProfileIntentionAction method invoke.
@Override
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
final ProjectInspectionProfileManager profileManager = ProjectInspectionProfileManager.getInstance(project);
final ProjectInspectionToolsConfigurable configurable = new ProjectInspectionToolsConfigurable(profileManager) {
@Override
protected boolean acceptTool(InspectionToolWrapper entry) {
return super.acceptTool(entry) && entry.isCleanupTool();
}
@Override
public String getDisplayName() {
return CodeCleanupAction.CODE_CLEANUP_INSPECTIONS_DISPLAY_NAME;
}
};
ShowSettingsUtil.getInstance().editConfigurable(project, configurable);
}
use of com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable 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));
}
Aggregations