Skip to content

Commit

Permalink
chore: drop 222: Inline ProjectRootManagerExWrapper (bazelbuild#6723)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpasternak committed Sep 5, 2024
1 parent 5f64df8 commit 78fa3ee
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 218 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
import com.google.idea.blaze.java.sync.model.BlazeJavaSyncData;
import com.google.idea.common.experiments.ExperimentService;
import com.google.idea.common.experiments.MockExperimentService;
import com.google.idea.sdkcompat.roots.ex.ProjectRootManagerExWrapper;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.RootsChangeRescanningInfo;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
import com.intellij.openapi.roots.OrderEnumerator;
Expand Down Expand Up @@ -231,9 +231,22 @@ public void setLanguageLevel(@NotNull LanguageLevel languageLevel) {
}

/** Stores a project sdk so that it can be obtained later for verification. */
private static class MockProjectRootManagerEx extends ProjectRootManagerExWrapper {
private static class MockProjectRootManagerEx extends ProjectRootManagerEx {
Sdk projectSdk;

@Override
public void makeRootsChange(
@NotNull Runnable runnable, @NotNull RootsChangeRescanningInfo rootsChangeRescanningInfo) {}

@Override
public @NotNull AutoCloseable withRootsChange(
@NotNull RootsChangeRescanningInfo rootsChangeRescanningInfo) {
return new AutoCloseable() {
@Override
public void close() throws Exception {}
};
}

@Nullable
@Override
public Sdk getProjectSdk() {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 78fa3ee

Please sign in to comment.