diff --git a/aswb/tests/unittests/com/google/idea/blaze/android/sync/BlazeAndroidSyncPluginTest.java b/aswb/tests/unittests/com/google/idea/blaze/android/sync/BlazeAndroidSyncPluginTest.java index b5b9eb089a4..feccbd317aa 100644 --- a/aswb/tests/unittests/com/google/idea/blaze/android/sync/BlazeAndroidSyncPluginTest.java +++ b/aswb/tests/unittests/com/google/idea/blaze/android/sync/BlazeAndroidSyncPluginTest.java @@ -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; @@ -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() { diff --git a/testing/testcompat/v223/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v223/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 66d65a099c2..00000000000 --- a/testing/testcompat/v223/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -} diff --git a/testing/testcompat/v231/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v231/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 6e30ba5d06d..00000000000 --- a/testing/testcompat/v231/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -} diff --git a/testing/testcompat/v232/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v232/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 6e30ba5d06d..00000000000 --- a/testing/testcompat/v232/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -} diff --git a/testing/testcompat/v233/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v233/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 6e30ba5d06d..00000000000 --- a/testing/testcompat/v233/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -} diff --git a/testing/testcompat/v241/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v241/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 6e30ba5d06d..00000000000 --- a/testing/testcompat/v241/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -} diff --git a/testing/testcompat/v242/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java b/testing/testcompat/v242/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java deleted file mode 100644 index 6e30ba5d06d..00000000000 --- a/testing/testcompat/v242/com/google/idea/sdkcompat/roots/ex/ProjectRootManagerExWrapper.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.sdkcompat.roots.ex; - -import com.intellij.openapi.project.RootsChangeRescanningInfo; -import com.intellij.openapi.roots.ex.ProjectRootManagerEx; -import org.jetbrains.annotations.NotNull; - -/** Shim for #api222 compat */ -public abstract class ProjectRootManagerExWrapper extends ProjectRootManagerEx { - @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 {} - }; - } -}