From 3e474191e32abcd1346ff13213ba36f0c22b8ff2 Mon Sep 17 00:00:00 2001 From: Johannes Koenen Date: Tue, 30 Jan 2024 10:58:39 +0000 Subject: [PATCH] QD-8139 Refactor project opening First step to make scripts take over this functionality: Extract all the necessary steps from the application classes and clean them up. Merge-request: IJ-MR-124556 Merged-by: Johannes Koenen GitOrigin-RevId: 6f8b7d8c5a0e4ccb94af476e4a46ca149626eabe --- .../intellij/codeInspection/InspectionApplicationBase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java index b73b20e4c53c..e785bf5ae7d8 100644 --- a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java +++ b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java @@ -218,7 +218,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR runAnalysisOnScope(projectPath, parentDisposable, project, myInspectionProfile, scope); } - protected @Nullable Project openProject(@NotNull Path projectPath, @NotNull Disposable parentDisposable) + private final @Nullable Project openProject(@NotNull Path projectPath, @NotNull Disposable parentDisposable) throws InterruptedException, ExecutionException { VirtualFile vfsProject = LocalFileSystem.getInstance().refreshAndFindFileByPath( FileUtil.toSystemIndependentName(projectPath.toString())); @@ -279,7 +279,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR return new AnalysisScope(scope, project); } - public @Nullable SearchScope getSearchScope(@NotNull Project project) throws ExecutionException, InterruptedException { + private SearchScope getSearchScope(@NotNull Project project) throws ExecutionException, InterruptedException { if (myAnalyzeChanges) { return getSearchScopeFromChangedFiles(project); @@ -437,7 +437,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR runAnalysis(project, projectPath, inspectionProfile, scope, reportConverter, resultsDataPath); } - public void configureProject(@NotNull Path projectPath, @NotNull Project project, @NotNull AnalysisScope scope) { + private void configureProject(@NotNull Path projectPath, @NotNull Project project, @NotNull AnalysisScope scope) { for (CommandLineInspectionProjectConfigurator configurator : CommandLineInspectionProjectConfigurator.EP_NAME.getIterable()) { CommandLineInspectionProjectConfigurator.ConfiguratorContext context = configuratorContext(projectPath, scope);