[maven] IDEA-313767 code cleanup

GitOrigin-RevId: d57ecea9e6f91bfaab850825eecba3f53d38c91d
This commit is contained in:
Dmitry Kichinsky
2023-05-10 11:58:23 +02:00
committed by intellij-monorepo-bot
parent ba3640debe
commit 77b34660f3
2 changed files with 9 additions and 8 deletions

View File

@@ -522,6 +522,7 @@ public final class MavenProjectReader {
throws MavenProcessCanceledException {
return resolveProject(generalSettings, embedder, files, explicitProfiles, locator, null);
}
public Collection<MavenProjectReaderResult> resolveProject(MavenGeneralSettings generalSettings,
MavenEmbedderWrapper embedder,
Collection<VirtualFile> files,

View File

@@ -130,12 +130,12 @@ public abstract class MavenEmbedderWrapper extends MavenRemoteObjectWrapper<Mave
@NotNull
public Collection<MavenServerExecutionResult> resolveProject(@NotNull Collection<VirtualFile> files,
@NotNull MavenExplicitProfiles explicitProfiles,
@NotNull MavenProgressIndicator progressIndicator)
@Nullable MavenProgressIndicator progressIndicator)
throws MavenProcessCanceledException {
Transformer transformer = files.isEmpty() ?
Transformer.ID :
RemotePathTransformerFactory.createForProject(myProject);
final List<File> ioFiles = ContainerUtil.map(files, file -> new File(transformer.toRemotePath(file.getPath())));
List<File> ioFiles = ContainerUtil.map(files, file -> new File(transformer.toRemotePath(file.getPath())));
var results = runLongRunningTask(
(embedder, longRunningTaskId) ->
@@ -158,16 +158,16 @@ public abstract class MavenEmbedderWrapper extends MavenRemoteObjectWrapper<Mave
}
@Nullable
public String evaluateEffectivePom(@NotNull final VirtualFile file,
@NotNull final Collection<String> activeProfiles,
@NotNull final Collection<String> inactiveProfiles) throws MavenProcessCanceledException {
public String evaluateEffectivePom(@NotNull VirtualFile file,
@NotNull Collection<String> activeProfiles,
@NotNull Collection<String> inactiveProfiles) throws MavenProcessCanceledException {
return evaluateEffectivePom(new File(file.getPath()), activeProfiles, inactiveProfiles);
}
@Nullable
public String evaluateEffectivePom(@NotNull final File file,
@NotNull final Collection<String> activeProfiles,
@NotNull final Collection<String> inactiveProfiles) throws MavenProcessCanceledException {
public String evaluateEffectivePom(@NotNull File file,
@NotNull Collection<String> activeProfiles,
@NotNull Collection<String> inactiveProfiles) throws MavenProcessCanceledException {
return performCancelable(() -> getOrCreateWrappee()
.evaluateEffectivePom(file, new ArrayList<>(activeProfiles), new ArrayList<>(inactiveProfiles), ourToken));
}