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 <Johannes.Koenen@jetbrains.com>

GitOrigin-RevId: 6f8b7d8c5a0e4ccb94af476e4a46ca149626eabe
This commit is contained in:
Johannes Koenen
2024-01-30 10:58:39 +00:00
committed by intellij-monorepo-bot
parent eb33d97397
commit 3e474191e3

View File

@@ -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);