mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rider] allow to pass postRunnable argument for test purpose
This commit is contained in:
+5
-1
@@ -52,6 +52,10 @@ public class SilentCodeCleanupAction extends AnAction {
|
||||
runInspections(project, analysisScope);
|
||||
}
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
@Nullable
|
||||
protected Runnable getPostRunnable() { return null; }
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
protected void runInspections(@NotNull Project project, @NotNull AnalysisScope scope) {
|
||||
InspectionProfile profile = getProfileForSilentCleanup(project);
|
||||
@@ -60,7 +64,7 @@ public class SilentCodeCleanupAction extends AnAction {
|
||||
}
|
||||
InspectionManager managerEx = InspectionManager.getInstance(project);
|
||||
GlobalInspectionContextBase globalContext = (GlobalInspectionContextBase) managerEx.createNewGlobalContext(false);
|
||||
globalContext.codeCleanup(scope, profile, getTemplatePresentation().getText(), null, false);
|
||||
globalContext.codeCleanup(scope, profile, getTemplatePresentation().getText(), getPostRunnable(), false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
|
||||
Reference in New Issue
Block a user