From fe1e25c8ea53eed4a5165ae8ff4b2ec9c1aaba9a Mon Sep 17 00:00:00 2001 From: Daniel Brauner Date: Wed, 15 Jan 2025 21:18:55 +0100 Subject: [PATCH 1/4] Clean up build scripts - Removed android studio references - Removed cloud code references - Removed support for <242 --- .bazelrc | 1 - MODULE.bazel | 428 +------------- base/BUILD | 26 +- clwb/sdkcompat/BUILD | 5 - cpp/sdkcompat/BUILD | 8 - intellij_platform_sdk/BUILD | 523 +----------------- intellij_platform_sdk/BUILD.android_studio223 | 19 - intellij_platform_sdk/BUILD.android_studio231 | 19 - intellij_platform_sdk/BUILD.android_studio232 | 19 - intellij_platform_sdk/BUILD.clion223 | 98 ---- intellij_platform_sdk/BUILD.clion231 | 98 ---- intellij_platform_sdk/BUILD.clion232 | 101 ---- intellij_platform_sdk/BUILD.clion233 | 101 ---- intellij_platform_sdk/BUILD.clion241 | 113 ---- intellij_platform_sdk/BUILD.idea223 | 118 ---- intellij_platform_sdk/BUILD.idea231 | 118 ---- intellij_platform_sdk/BUILD.idea232 | 118 ---- intellij_platform_sdk/BUILD.idea233 | 118 ---- intellij_platform_sdk/BUILD.idea241 | 137 ----- intellij_platform_sdk/BUILD.ue223 | 152 ----- intellij_platform_sdk/BUILD.ue231 | 152 ----- intellij_platform_sdk/BUILD.ue232 | 152 ----- intellij_platform_sdk/BUILD.ue233 | 152 ----- intellij_platform_sdk/BUILD.ue241 | 166 ------ intellij_platform_sdk/android_studio.bzl | 319 ----------- intellij_platform_sdk/build_defs.bzl | 206 +------ sdkcompat/BUILD | 24 +- sdkcompat/v243/BUILD | 6 - testing/BUILD | 94 +--- third_party/devkit/BUILD | 4 - third_party/go/BUILD | 14 +- third_party/javascript/BUILD | 50 +- third_party/python/BUILD | 48 +- third_party/scala/BUILD | 14 +- third_party/toml/BUILD | 2 - 35 files changed, 51 insertions(+), 3672 deletions(-) delete mode 100644 intellij_platform_sdk/BUILD.android_studio223 delete mode 100644 intellij_platform_sdk/BUILD.android_studio231 delete mode 100644 intellij_platform_sdk/BUILD.android_studio232 delete mode 100644 intellij_platform_sdk/BUILD.clion223 delete mode 100644 intellij_platform_sdk/BUILD.clion231 delete mode 100644 intellij_platform_sdk/BUILD.clion232 delete mode 100644 intellij_platform_sdk/BUILD.clion233 delete mode 100644 intellij_platform_sdk/BUILD.clion241 delete mode 100644 intellij_platform_sdk/BUILD.idea223 delete mode 100644 intellij_platform_sdk/BUILD.idea231 delete mode 100644 intellij_platform_sdk/BUILD.idea232 delete mode 100644 intellij_platform_sdk/BUILD.idea233 delete mode 100644 intellij_platform_sdk/BUILD.idea241 delete mode 100644 intellij_platform_sdk/BUILD.ue223 delete mode 100644 intellij_platform_sdk/BUILD.ue231 delete mode 100644 intellij_platform_sdk/BUILD.ue232 delete mode 100644 intellij_platform_sdk/BUILD.ue233 delete mode 100644 intellij_platform_sdk/BUILD.ue241 delete mode 100644 intellij_platform_sdk/android_studio.bzl diff --git a/.bazelrc b/.bazelrc index 4f6afdd1d1f..15bc031d4ca 100644 --- a/.bazelrc +++ b/.bazelrc @@ -8,7 +8,6 @@ query --deleted_packages=aspect/testing/tests/src/com/google/idea/blaze/aspect/i common --enable_bzlmod common --enable_workspace # to load rules_scala from WORKSPACE.bzlmod -common --android_sdk=@androidsdk//:sdk common --noincompatible_disallow_empty_glob # Disabled by default in bazel 8, https://github.com/bazelbuild/bazel/issues/24578 diff --git a/MODULE.bazel b/MODULE.bazel index c29ac4860cb..d3a2ddf1717 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -46,9 +46,6 @@ bazel_dep( version = "2.0.0", ) -remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") -use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") - bazel_dep( name = "rules_bazel_integration_test", version = "0.31.0", @@ -163,54 +160,6 @@ http_archive( url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2022.3/ideaIC-2022.3.zip", ) -# The plugin api for intellij_ce_2023_1. This is required to build IJwB and run integration tests. -IC_231_SHA = "4e1dbd508a3dc6394735ae864034aa3598d16ddd568c3de2a9d7a386f3508fff" - -IC_231_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2023.1.7/ideaIC-2023.1.7.zip" - -http_archive( - name = "intellij_ce_2023_1", - build_file = "@//intellij_platform_sdk:BUILD.idea231", - sha256 = IC_231_SHA, - url = IC_231_URL, -) - -# The plugin api for intellij_ce_2023_2. This is required to build IJwB and run integration tests. -IC_232_SHA = "d8ef9fe55f1c8084aa5da7b23f3858514bdbc5c0546a26e018b875976da04d5b" - -IC_232_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2023.2.8/ideaIC-2023.2.8.zip" - -http_archive( - name = "intellij_ce_2023_2", - build_file = "@//intellij_platform_sdk:BUILD.idea232", - sha256 = IC_232_SHA, - url = IC_232_URL, -) - -# The plugin api for intellij_ce_2023_2. This is required to build IJwB and run integration tests. -IC_233_SHA = "fe424303f34e52b8bbd867ebe839ec6006fdbace20e8dfb9bce702ef523a1f91" - -IC_233_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2023.3.8/ideaIC-2023.3.8.zip" - -http_archive( - name = "intellij_ce_2023_3", - build_file = "@//intellij_platform_sdk:BUILD.idea233", - sha256 = IC_233_SHA, - url = IC_233_URL, -) - -# The plugin api for intellij_ce_2024_1. This is required to build IJwB and run integration tests. -IC_241_SHA = "eb4da488ca2c8cf019fa69f7b97129bf76ab36b8acccf08b0673a8eed53ab432" - -IC_241_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2024.1.7/ideaIC-2024.1.7.zip" - -http_archive( - name = "intellij_ce_2024_1", - build_file = "@//intellij_platform_sdk:BUILD.idea241", - sha256 = IC_241_SHA, - url = IC_241_URL, -) - # The plugin api for intellij_ce_2024_2. This is required to build IJwB and run integration tests. IC_242_SHA = "67dc633ff20fadd702eae6d5b8e875c510791445a96e5f5a41ef902ab570966a" @@ -235,60 +184,6 @@ http_archive( url = IC_243_URL, ) -# The plugin api for intellij_ue_2022_3. This is required to run UE-specific integration tests. -http_archive( - name = "intellij_ue_2022_3", - build_file = "@//intellij_platform_sdk:BUILD.ue223", - sha256 = "0b17ea16e70290d912b6be246460907643c23f33ae2c22331084818025c2b297", - url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2022.3/ideaIU-2022.3.zip", -) - -# The plugin api for intellij_ue_2023_1. This is required to run UE-specific integration tests. -IU_231_SHA = "46900f8b8aa65a4b522e2b7eb365337e836bc7c49b00b23b47860170f5b95c07" - -IU_231_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2023.1.7/ideaIU-2023.1.7.zip" - -http_archive( - name = "intellij_ue_2023_1", - build_file = "@//intellij_platform_sdk:BUILD.ue231", - sha256 = IU_231_SHA, - url = IU_231_URL, -) - -# The plugin api for intellij_ue_2023_2. This is required to run UE-specific integration tests. -IU_232_SHA = "30c0bfce923087199cb1d8a3dc8120bc1e03d834a9cf236a3924a42f0351d910" - -IU_232_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2023.2.8/ideaIU-2023.2.8.zip" - -http_archive( - name = "intellij_ue_2023_2", - build_file = "@//intellij_platform_sdk:BUILD.ue232", - sha256 = IU_232_SHA, - url = IU_232_URL, -) - -IU_233_SHA = "27b011801301c0e7dfb903b447a2dacd5803d9734e45a97b0f6c5947c57a5699" - -IU_233_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2023.3.8/ideaIU-2023.3.8.zip" - -http_archive( - name = "intellij_ue_2023_3", - build_file = "@//intellij_platform_sdk:BUILD.ue233", - sha256 = IU_233_SHA, - url = IU_233_URL, -) - -IU_241_SHA = "346f94ca6ebd9f44b702714529bdae9bf9e42725edce7c447c7872d9bd94190d" - -IU_241_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2024.1.7/ideaIU-2024.1.7.zip" - -http_archive( - name = "intellij_ue_2024_1", - build_file = "@//intellij_platform_sdk:BUILD.ue241", - sha256 = IU_241_SHA, - url = IU_241_URL, -) - IU_242_SHA = "6374538aeb34376c7501819b19804a30ee4a49547b5bfe3aa4aa80735191324e" IU_242_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2024.2.5/ideaIU-2024.2.5.zip" @@ -311,60 +206,6 @@ http_archive( url = IU_243_URL, ) -# The plugin api for clion_2022_3. This is required to build CLwB\, and run integration tests. -http_archive( - name = "clion_2022_3", - build_file = "@//intellij_platform_sdk:BUILD.clion223", - sha256 = "5c248465a99f7286e7863ccc4fbd6772af890b57d71a02690e20031aa16d7957", - url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2022.3/clion-2022.3.zip", -) - -# The plugin api for clion_2023_1. This is required to build CLwB\, and run integration tests. -CLION_231_SHA = "2e94bfda121f54f96b7faf1a4df2da50d394c6ae46da6e98f37a731e2b50b189" - -CLION_231_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2023.1.7/clion-2023.1.7.zip" - -http_archive( - name = "clion_2023_1", - build_file = "@//intellij_platform_sdk:BUILD.clion231", - sha256 = CLION_231_SHA, - url = CLION_231_URL, -) - -# The plugin api for clion_2023_2. This is required to build CLwB\, and run integration tests. -CLION_232_SHA = "542f805229177a97e5d1e7592397d017976fdba234b2229a85c86fe70b6dd352" - -CLION_232_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2023.2.5/clion-2023.2.5.zip" - -http_archive( - name = "clion_2023_2", - build_file = "@//intellij_platform_sdk:BUILD.clion232", - sha256 = CLION_232_SHA, - url = CLION_232_URL, -) - -CLION_233_SHA = "6ebfe8e7fc2bf20e3d7d0738d39d1b3db3f7de5fe6b56ceb7f293ab53f23e2d5" - -CLION_233_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2023.3.6/clion-2023.3.6.zip" - -http_archive( - name = "clion_2023_3", - build_file = "@//intellij_platform_sdk:BUILD.clion233", - sha256 = CLION_233_SHA, - url = CLION_233_URL, -) - -CLION_241_SHA = "8638829fbaba7f3974fd9ff8da18adc7e7c2ba08063082dbc8548deeb435ca5e" - -CLION_241_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2024.1.6/clion-2024.1.6.zip" - -http_archive( - name = "clion_2024_1", - build_file = "@//intellij_platform_sdk:BUILD.clion241", - sha256 = CLION_241_SHA, - url = CLION_241_URL, -) - CLION_242_SHA = "27029107088193b6ba0d3d888ce67fcdd1aae68f324c4c6ddadfdd4c3c90b87e" CLION_242_URL = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/clion/clion/2024.2.4/clion-2024.2.4.zip" @@ -395,26 +236,15 @@ java_import( ) """ -DEVKIT_233_SHA = "e90a150070520c5344e65b33161738cd03186b5f2e23c942cba2f2cee5771e4e" - -DEVKIT_233_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/233.15619.17/DevKit-233.15619.17.zip" - -http_archive( - name = "devkit_2023_3", - build_file_content = DEVKIT_BUILD_FILE, - sha256 = DEVKIT_233_SHA, - url = DEVKIT_233_URL, -) - -DEVKIT_241_SHA = "3103f6de79a17a7740fef010d0152464acb32266d617cafa47c05d7561f11eb3" +DEVKIT_242_SHA = "628545e45a8b450527224105910deef6b2af568b084d2b3afbd1e8b75e561a70" -DEVKIT_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/241.19416.23/DevKit-241.19416.23.zip" +DEVKIT_242_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/242.23726.103/DevKit-242.23726.103.zip" http_archive( - name = "devkit_2024_1", + name = "devkit_2024_2", build_file_content = DEVKIT_BUILD_FILE, - sha256 = DEVKIT_241_SHA, - url = DEVKIT_241_URL, + sha256 = DEVKIT_242_SHA, + url = DEVKIT_242_URL, ) DEVKIT_243_SHA = "b3403b6a3c1dadd0eaaaa12cc21c910bc0e9c7264c55a9785a7ece188cba5ec6" @@ -428,91 +258,7 @@ http_archive( url = DEVKIT_243_URL, ) -DEVKIT_242_SHA = "628545e45a8b450527224105910deef6b2af568b084d2b3afbd1e8b75e561a70" - -DEVKIT_242_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/DevKit/242.23726.103/DevKit-242.23726.103.zip" - -http_archive( - name = "devkit_2024_2", - build_file_content = DEVKIT_BUILD_FILE, - sha256 = DEVKIT_242_SHA, - url = DEVKIT_242_URL, -) - _PYTHON_CE_BUILD_FILE = """ -java_import( - name = "python", - jars = ["python-ce/lib/python-ce.jar"], - visibility = ["//visibility:public"], -) -filegroup( - name = "python_helpers", - srcs = glob(["python-ce/helpers/**/*"]), - visibility = ["//visibility:public"], -) -""" - -#TODO(ymoh): remove with the removal of 2021.1 Python plugin -# Python plugin for IntelliJ CE. Required at compile-time for python-specific features. -http_archive( - name = "python_2021_1", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = "7d16cc9bf80c9e2c26d55d55564c1c174583a5e6900e6b7f13d5663275b07644", - url = "https://plugins.jetbrains.com/files/7322/125352/python-ce-211.7628.24.zip", -) - -http_archive( - name = "python_2022_3", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = "65db7c364a3f1756cf07fb161ff4eb67fd8f8612a8c3da812b2f9ba5b2d6e13d", - url = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/223.7571.182/PythonCore-223.7571.182.zip", -) - -PYTHON_PLUGIN_231_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/231.9225.4/PythonCore-231.9225.4.zip" - -PYTHON_PLUGIN_231_SHA = "bb9fe55fc483b4da1f6062c764ebd076d0de9f913c924db295f2bd2f05353777" - -http_archive( - name = "python_2023_1", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = PYTHON_PLUGIN_231_SHA, - url = PYTHON_PLUGIN_231_URL, -) - -PYTHON_PLUGIN_232_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/232.10300.40/PythonCore-232.10300.40.zip" - -PYTHON_PLUGIN_232_SHA = "eab4b343491772123cd7daa4c3924d81de29ecd3a74495679216c28cc1bd0005" - -http_archive( - name = "python_2023_2", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = PYTHON_PLUGIN_232_SHA, - url = PYTHON_PLUGIN_232_URL, -) - -PYTHON_PLUGIN_233_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/233.14808.12/PythonCore-233.14808.12.zip" - -PYTHON_PLUGIN_233_SHA = "ce1c20372e558bc59076674eafc1a7fc55a3a3606116fd20f64032c02136091b" - -http_archive( - name = "python_2023_3", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = PYTHON_PLUGIN_233_SHA, - url = PYTHON_PLUGIN_233_URL, -) - -PYTHON_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/PythonCore/241.19416.15/PythonCore-241.19416.15.zip" - -PYTHON_PLUGIN_241_SHA = "c66bd035b38e4b037e0b7c454a056d62944782c051dfe6b8ea61c0beed506732" - -http_archive( - name = "python_2024_1", - build_file_content = _PYTHON_CE_BUILD_FILE, - sha256 = PYTHON_PLUGIN_241_SHA, - url = PYTHON_PLUGIN_241_URL, -) - -_PYTHON_CE_242_BUILD_FILE = """ java_import( name = "python", jars = glob(["python-ce/lib/*.jar", "python-ce/lib/modules/*.jar"]), @@ -531,7 +277,7 @@ PYTHON_PLUGIN_242_SHA = "ac5ea796655322d5cc0a1579fbcc97ae57e558dde0a4bd6b78a20d1 http_archive( name = "python_2024_2", - build_file_content = _PYTHON_CE_242_BUILD_FILE, + build_file_content = _PYTHON_CE_BUILD_FILE, sha256 = PYTHON_PLUGIN_242_SHA, url = PYTHON_PLUGIN_242_URL, ) @@ -542,71 +288,12 @@ PYTHON_PLUGIN_243_SHA = "49d2ff442ddbedd40ab063b761ad6452fd0c0caaf4828256d5ce84d http_archive( name = "python_2024_3", - build_file_content = _PYTHON_CE_242_BUILD_FILE, + build_file_content = _PYTHON_CE_BUILD_FILE, sha256 = PYTHON_PLUGIN_243_SHA, url = PYTHON_PLUGIN_243_URL, ) -_GO_BUILD_FILE_223 = """ -java_import( - name = "go", - jars = glob(["go-plugin/lib/*.jar"]), - visibility = ["//visibility:public"], -) -""" - -http_archive( - name = "go_2022_3", - build_file_content = _GO_BUILD_FILE_223, - sha256 = "11d30e00aa21fc8c7aa47df3743c0180058556cbb73292c712e151a0c3d59908", - url = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/223.7571.182/org.jetbrains.plugins.go-223.7571.182.zip", -) - -GO_PLUGIN_231_SHA = "a8d277125ec1f6a2ba0190a7c456d6c39057e563596874ec432a8f278b3d6976" - -GO_PLUGIN_231_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/231.9392.1/org.jetbrains.plugins.go-231.9392.1.zip" - -http_archive( - name = "go_2023_1", - build_file_content = _GO_BUILD_FILE_223, - sha256 = GO_PLUGIN_231_SHA, - url = GO_PLUGIN_231_URL, -) - -GO_PLUGIN_232_SHA = "6682325b13d66b716fc9bc719821f3f7bad16f21ac4504cc4656265fee74ceb4" - -GO_PLUGIN_232_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/232.10203.2/org.jetbrains.plugins.go-232.10203.2.zip" - -http_archive( - name = "go_2023_2", - build_file_content = _GO_BUILD_FILE_223, - sha256 = GO_PLUGIN_232_SHA, - url = GO_PLUGIN_232_URL, -) - -GO_PLUGIN_233_SHA = "6ec43880bfbedaead564def4b9f40baa13de4167d7d7c7c0522f7e7c5dd77a77" - -GO_PLUGIN_233_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/233.15026.9/org.jetbrains.plugins.go-233.15026.9.zip" - -http_archive( - name = "go_2023_3", - build_file_content = _GO_BUILD_FILE_223, - sha256 = GO_PLUGIN_233_SHA, - url = GO_PLUGIN_233_URL, -) - -GO_PLUGIN_241_SHA = "18f9b114a372730e3b869cc3bf99bc3e019611571aa0edfd0517f1d10b83e422" - -GO_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.jetbrains.plugins.go/241.18968.26/org.jetbrains.plugins.go-241.18968.26.zip" - -http_archive( - name = "go_2024_1", - build_file_content = _GO_BUILD_FILE_223, - sha256 = GO_PLUGIN_241_SHA, - url = GO_PLUGIN_241_URL, -) - -_GO_BUILD_FILE_242 = """ +_GO_BUILD_FILE = """ java_import( name = "go", jars = glob(["go-plugin/lib/*.jar", "go-plugin/lib/modules/*.jar"]), @@ -620,7 +307,7 @@ GO_PLUGIN_242_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/o http_archive( name = "go_2024_2", - build_file_content = _GO_BUILD_FILE_242, + build_file_content = _GO_BUILD_FILE, sha256 = GO_PLUGIN_242_SHA, url = GO_PLUGIN_242_URL, ) @@ -631,7 +318,7 @@ GO_PLUGIN_243_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/o http_archive( name = "go_2024_3", - build_file_content = _GO_BUILD_FILE_242, + build_file_content = _GO_BUILD_FILE, sha256 = GO_PLUGIN_243_SHA, url = GO_PLUGIN_243_URL, ) @@ -644,57 +331,6 @@ java_import( ) """ -http_archive( - name = "scala_2022_3", - build_file_content = _SCALA_BUILD_FILE, - sha256 = "f028ac7263433c8692d9d4c92aaba9e114fc75f6299d4d86817db371409f74f3", - url = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2022.3.13/org.intellij.scala-2022.3.13.zip", -) - -SCALA_PLUGIN_231_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2023.1.25/org.intellij.scala-2023.1.25.zip" - -SCALA_PLUGIN_231_SHA = "b45dbb95ed5a0001f11638e7f03dd858d9e243994ca554a64e1df6b7290b2b81" - -http_archive( - name = "scala_2023_1", - build_file_content = _SCALA_BUILD_FILE, - sha256 = SCALA_PLUGIN_231_SHA, - url = SCALA_PLUGIN_231_URL, -) - -SCALA_PLUGIN_232_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2023.2.30/org.intellij.scala-2023.2.30.zip" - -SCALA_PLUGIN_232_SHA = "16896d256bea7f84343dbfec11808c8d9f861fdc99b0ca26d2eeb5d510398ba8" - -http_archive( - name = "scala_2023_2", - build_file_content = _SCALA_BUILD_FILE, - sha256 = SCALA_PLUGIN_232_SHA, - url = SCALA_PLUGIN_232_URL, -) - -SCALA_PLUGIN_233_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2023.3.30/org.intellij.scala-2023.3.30.zip" - -SCALA_PLUGIN_233_SHA = "0c7ffd6f642face7d15d0f8aaa40430041c8a3d00d3b213659d17146f64e2052" - -http_archive( - name = "scala_2023_3", - build_file_content = _SCALA_BUILD_FILE, - sha256 = SCALA_PLUGIN_233_SHA, - url = SCALA_PLUGIN_233_URL, -) - -SCALA_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2024.1.25/org.intellij.scala-2024.1.25.zip" - -SCALA_PLUGIN_241_SHA = "3d550756eab61858618dc7d695283cd0569c47b680bf823f2d46fd9c130f5422" - -http_archive( - name = "scala_2024_1", - build_file_content = _SCALA_BUILD_FILE, - sha256 = SCALA_PLUGIN_241_SHA, - url = SCALA_PLUGIN_241_URL, -) - SCALA_PLUGIN_242_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.intellij.scala/2024.2.30/org.intellij.scala-2024.2.30.zip" SCALA_PLUGIN_242_SHA = "2b3ebb4377a59ef465a1b352d857d2feb4e407dd9fcae405ad0edfef833ae783" @@ -725,18 +361,6 @@ java_import( ) """ -TOML_PLUGIN_241_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.toml.lang/241.17011.8/org.toml.lang-241.17011.8.zip" - -TOML_PLUGIN_241_SHA = "17572527d9aa2f31cd9fa670de68054cb586af3aa2eca9cb204b0f33043e9839" - -# TOML required by Python since 241.13688.18 -http_archive( - name = "toml_2024_1", - build_file_content = _TOML_BUILD_FILE, - sha256 = TOML_PLUGIN_241_SHA, - url = TOML_PLUGIN_241_URL, -) - TOML_PLUGIN_242_URL = "https://plugins.jetbrains.com/maven/com/jetbrains/plugins/org.toml.lang/242.20224.155/org.toml.lang-242.20224.155.zip" TOML_PLUGIN_242_SHA = "96bd1964b5b4bc7f778c87dddee11b8f7e3d08559a2a72e52909ce4d31be2d9c" @@ -760,38 +384,6 @@ http_archive( url = TOML_PLUGIN_243_URL, ) -# The plugin api for android_studio_dev android_studio. This is required to build ASwB and run integration tests -http_archive( - name = "android_studio_dev", - build_file = "@//intellij_platform_sdk:BUILD.android_studiodev", - sha256 = "cb3f0494220f92dd85399adfb8655a1a2bd81b238d26e63a8bbd8bde95a0fccf", - url = "https://android-build", -) - -# The plugin api for android_studio_2023_2 android_studio. This is required to build ASwB and run integration tests -http_archive( - name = "android_studio_2023_2", - build_file = "@//intellij_platform_sdk:BUILD.android_studio232", - sha256 = "f2ccc445fb5c87525627ae81725241ab90d9707d577f5732563d3c5a49cba12f", - url = "https://dl.google.com/dl/android/studio/ide-zips/2023.2.1.14/android-studio-2023.2.1.14-linux.tar.gz", -) - -# The plugin api for android_studio_2023_1 android_studio. This is required to build ASwB and run integration tests -http_archive( - name = "android_studio_2023_1", - build_file = "@//intellij_platform_sdk:BUILD.android_studio231", - sha256 = "139d0dbb4909353b68fbf55c09b6d31a34512044a9d4f02ce0f1a9accca128f9", - url = "https://dl.google.com/dl/android/studio/ide-zips/2023.1.1.28/android-studio-2023.1.1.28-linux.tar.gz", -) - -# The plugin api for android_studio_2022_3 android_studio. This is required to build ASwB and run integration tests -http_archive( - name = "android_studio_2022_3", - build_file = "@//intellij_platform_sdk:BUILD.android_studio223", - sha256 = "250625dcab183e0c68ebf12ef8a522af7369527d76f1efc704f93c05b02ffa9e", - url = "https://dl.google.com/dl/android/studio/ide-zips/2022.3.1.19/android-studio-2022.3.1.19-linux.tar.gz", -) - # needed for cpp tests http_archive( name = "com_google_absl", diff --git a/base/BUILD b/base/BUILD index 75f35502827..94a4ff823b5 100644 --- a/base/BUILD +++ b/base/BUILD @@ -53,28 +53,10 @@ kt_jvm_library( intellij_plugin_library( name = "plugin_library", - plugin_xmls = ["src/META-INF/blaze-base.xml"] + #api241 - select_for_plugin_api({ - "android-studio-2022.3": [], - "android-studio-2023.1": [], - "android-studio-2023.2": [], - "intellij-2022.3": [], - "intellij-ue-2022.3": [], - "intellij-2023.1": [], - "intellij-ue-2023.1": [], - "intellij-2023.2": [], - "intellij-ue-2023.2": [], - "intellij-2023.3": [], - "intellij-ue-2023.3": [], - "intellij-2024.1": [], - "intellij-ue-2024.1": [], - "clion-2022.3": [], - "clion-2023.1": [], - "clion-2023.2": [], - "clion-2023.3": [], - "clion-2024.1": [], - "default": ["src/META-INF/dependency-on-lvcs-impl.xml"], - }), + plugin_xmls = [ + "src/META-INF/dependency-on-lvcs-impl.xml", + "src/META-INF/blaze-base.xml", + ], visibility = PLUGIN_PACKAGES_VISIBILITY, deps = [ ":base", diff --git a/clwb/sdkcompat/BUILD b/clwb/sdkcompat/BUILD index 32f9e30d345..f954ff2450d 100644 --- a/clwb/sdkcompat/BUILD +++ b/clwb/sdkcompat/BUILD @@ -21,11 +21,6 @@ load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") kt_jvm_library( name = "sdkcompat", srcs = select_for_plugin_api({ - "clion-2022.3": ["//clwb/sdkcompat/v223"], - "clion-2023.1": ["//clwb/sdkcompat/v231"], - "clion-2023.2": ["//clwb/sdkcompat/v232"], - "clion-2023.3": ["//clwb/sdkcompat/v233"], - "clion-2024.1": ["//clwb/sdkcompat/v241"], "clion-2024.2": ["//clwb/sdkcompat/v242"], "clion-2024.3": ["//clwb/sdkcompat/v243"], }), diff --git a/cpp/sdkcompat/BUILD b/cpp/sdkcompat/BUILD index 7339412affa..a5de3e7b3c0 100644 --- a/cpp/sdkcompat/BUILD +++ b/cpp/sdkcompat/BUILD @@ -6,14 +6,6 @@ load( java_library( name = "sdkcompat", srcs = select_for_plugin_api({ - "android-studio-2022.3": ["//cpp/sdkcompat/v223"], - "android-studio-2023.1": ["//cpp/sdkcompat/v231"], - "android-studio-2023.2": ["//cpp/sdkcompat/v232"], - "clion-2022.3": ["//cpp/sdkcompat/v223"], - "clion-2023.1": ["//cpp/sdkcompat/v231"], - "clion-2023.2": ["//cpp/sdkcompat/v232"], - "clion-2023.3": ["//cpp/sdkcompat/v233"], - "clion-2024.1": ["//cpp/sdkcompat/v241"], "clion-2024.2": ["//cpp/sdkcompat/v242"], "clion-2024.3": ["//cpp/sdkcompat/v243"], }), diff --git a/intellij_platform_sdk/BUILD b/intellij_platform_sdk/BUILD index 683b693c85e..0640c076e8c 100644 --- a/intellij_platform_sdk/BUILD +++ b/intellij_platform_sdk/BUILD @@ -22,50 +22,6 @@ licenses(["notice"]) create_test_libs_visibility_package() -config_setting( - name = "intellij-latest", - values = { - "define": "ij_product=intellij-latest", - }, -) - -config_setting( - name = "intellij-latest-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-latest", - }, -) - -config_setting( - name = "intellij-ue-latest", - values = { - "define": "ij_product=intellij-ue-latest", - }, -) - -config_setting( - name = "intellij-ue-latest-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-ue-latest", - }, -) - -config_setting( - name = "intellij-beta", - values = { - "define": "ij_product=intellij-beta", - }, -) - -config_setting( - name = "intellij-ue-beta", - values = { - "define": "ij_product=intellij-ue-beta", - }, -) - config_setting( name = "intellij-oss-oldest-stable", values = { @@ -122,81 +78,11 @@ config_setting( }, ) -config_setting( - name = "intellij-2022.3", - values = { - "define": "ij_product=intellij-2022.3", - }, -) - -config_setting( - name = "intellij-2022.3-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-2022.3", - }, -) - -config_setting( - name = "intellij-2023.1", - values = { - "define": "ij_product=intellij-2023.1", - }, -) - -config_setting( - name = "intellij-2023.1-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-2023.1", - }, -) - -config_setting( - name = "intellij-2023.2", - values = { - "define": "ij_product=intellij-2023.2", - }, -) - -config_setting( - name = "intellij-2023.2-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-2023.2", - }, -) - -config_setting( - name = "intellij-2023.3", - values = { - "define": "ij_product=intellij-2023.3", - }, -) - -config_setting( - name = "intellij-2024.1", - values = {"define": "ij_product=intellij-2024.1"}, -) - config_setting( name = "intellij-2024.2", values = {"define": "ij_product=intellij-2024.2"}, ) -config_setting( - name = "intellij-2024.3", - values = {"define": "ij_product=intellij-2024.3"}, -) - -config_setting( - name = "intellij-2024.3-mac", - values = { - "define": "ij_product=intellij-2024.3", - "cpu": "darwin_x86_64", - }, -) - config_setting( name = "intellij-2024.2-mac", values = { @@ -206,96 +92,23 @@ config_setting( ) config_setting( - name = "intellij-2024.1-mac", - values = { - "define": "ij_product=intellij-2024.1", - "cpu": "darwin_x86_64", - }, -) - -config_setting( - name = "intellij-2023.3-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-2023.3", - }, -) - -config_setting( - name = "intellij-ue-2022.3", - values = { - "define": "ij_product=intellij-ue-2022.3", - }, -) - -config_setting( - name = "intellij-ue-2022.3-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-ue-2022.3", - }, -) - -config_setting( - name = "intellij-ue-2023.1", - values = { - "define": "ij_product=intellij-ue-2023.1", - }, -) - -config_setting( - name = "intellij-ue-2023.2-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-ue-2023.2", - }, -) - -config_setting( - name = "intellij-ue-2023.2", - values = { - "define": "ij_product=intellij-ue-2023.2", - }, + name = "intellij-2024.3", + values = {"define": "ij_product=intellij-2024.3"}, ) config_setting( - name = "intellij-ue-2023.3-mac", + name = "intellij-2024.3-mac", values = { + "define": "ij_product=intellij-2024.3", "cpu": "darwin_x86_64", - "define": "ij_product=intellij-ue-2023.3", }, ) -config_setting( - name = "intellij-ue-2023.3", - values = { - "define": "ij_product=intellij-ue-2023.3", - }, -) - -config_setting( - name = "intellij-ue-2024.1", - values = {"define": "ij_product=intellij-ue-2024.1"}, -) - config_setting( name = "intellij-ue-2024.2", values = {"define": "ij_product=intellij-ue-2024.2"}, ) -config_setting( - name = "intellij-ue-2024.3", - values = {"define": "ij_product=intellij-ue-2024.3"}, -) - -config_setting( - name = "intellij-ue-2024.3-mac", - values = { - "define": "ij_product=intellij-ue-2024.3", - "cpu": "darwin_x86_64", - }, -) - config_setting( name = "intellij-ue-2024.2-mac", values = { @@ -305,142 +118,15 @@ config_setting( ) config_setting( - name = "intellij-ue-2024.1-mac", - values = { - "define": "ij_product=intellij-ue-2024.1", - "cpu": "darwin_x86_64", - }, -) - -config_setting( - name = "intellij-ue-2023.1-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=intellij-ue-2023.1", - }, -) -config_setting( - name = "android-studio-latest", - values = { - "define": "ij_product=android-studio-latest", - }, -) - -config_setting( - name = "android-studio-latest-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-latest", - }, -) - -config_setting( - name = "android-studio-beta", - values = { - "define": "ij_product=android-studio-beta", - }, -) - -config_setting( - name = "android-studio-beta-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-beta", - }, -) - -config_setting( - name = "android-studio-canary", - values = { - "define": "ij_product=android-studio-canary", - }, -) - -config_setting( - name = "android-studio-intellij-ext", - values = { - "define": "intellij-ext=true", - }, -) - -config_setting( - name = "android-studio-canary-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-canary", - }, -) - -config_setting( - name = "android-studio-oss-oldest-stable", - values = { - "define": "ij_product=android-studio-oss-oldest-stable", - }, -) - -config_setting( - name = "android-studio-oss-latest-stable", - values = { - "define": "ij_product=android-studio-oss-latest-stable", - }, -) - -config_setting( - name = "android-studio-oss-under-dev", - values = { - "define": "ij_product=android-studio-oss-under-dev", - }, -) - -config_setting( - name = "android-studio-2022.3", - values = { - "define": "ij_product=android-studio-2022.3", - }, -) - -config_setting( - name = "android-studio-2022.3-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-2022.3", - }, -) - -config_setting( - name = "android-studio-2023.1", - values = { - "define": "ij_product=android-studio-2023.1", - }, -) - -config_setting( - name = "android-studio-2023.1-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-2023.1", - }, -) - -config_setting( - name = "android-studio-2023.2", - values = { - "define": "ij_product=android-studio-2023.2", - }, + name = "intellij-ue-2024.3", + values = {"define": "ij_product=intellij-ue-2024.3"}, ) config_setting( - name = "android-studio-2023.2-mac", + name = "intellij-ue-2024.3-mac", values = { + "define": "ij_product=intellij-ue-2024.3", "cpu": "darwin_x86_64", - "define": "ij_product=android-studio-2023.2", - }, -) - -config_setting( - name = "clion-latest", - values = { - "define": "ij_product=clion-latest", }, ) @@ -466,89 +152,18 @@ config_setting( ) config_setting( - name = "clion-latest-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=clion-latest", - }, -) - -config_setting( - name = "clion-beta", - values = { - "define": "ij_product=clion-beta", - }, -) - -config_setting( - name = "clion-under-dev", - values = { - "define": "ij_product=clion-under-dev", - }, -) - -config_setting( - name = "clion-2022.3", - values = { - "define": "ij_product=clion-2022.3", - }, -) - -config_setting( - name = "clion-2022.3-mac", - values = { - "cpu": "darwin_x86_64", - "define": "ij_product=clion-2022.3", - }, -) - -config_setting( - name = "clion-2023.1", - values = { - "define": "ij_product=clion-2023.1", - }, + name = "clion-2024.2", + values = {"define": "ij_product=clion-2024.2"}, ) config_setting( - name = "clion-2023.1-mac", + name = "clion-2024.2-mac", values = { + "define": "ij_product=clion-2024.2", "cpu": "darwin_x86_64", - "define": "ij_product=clion-2023.1", }, ) -config_setting( - name = "clion-2023.2", - values = { - "define": "ij_product=clion-2023.2", - }, -) - -config_setting( - name = "clion-2023.2-mac", - values = { - "cpu": "darwin_x86_64", #todo how about m1? - "define": "ij_product=clion-2023.2", - }, -) - -config_setting( - name = "clion-2023.3", - values = { - "define": "ij_product=clion-2023.3", - }, -) - -config_setting( - name = "clion-2024.1", - values = {"define": "ij_product=clion-2024.1"}, -) - -config_setting( - name = "clion-2024.2", - values = {"define": "ij_product=clion-2024.2"}, -) - config_setting( name = "clion-2024.3", values = {"define": "ij_product=clion-2024.3"}, @@ -562,72 +177,6 @@ config_setting( }, ) -config_setting( - name = "clion-2024.2-mac", - values = { - "define": "ij_product=clion-2024.2", - "cpu": "darwin_x86_64", - }, -) - -config_setting( - name = "clion-2024.1-mac", - values = { - "define": "ij_product=clion-2024.1", - "cpu": "darwin_x86_64", - }, -) - -config_setting( - name = "clion-2023.3-mac", - values = { - "cpu": "darwin_x86_64", #todo how about m1? - "define": "ij_product=clion-2023.3", - }, -) - -config_setting( - name = "intellij-cc-oldest-stable", - values = { - "define": "ij_product=intellij-cc-oldest-stable", - }, -) - -config_setting( - name = "intellij-cc-latest-stable", - values = { - "define": "ij_product=intellij-cc-latest-stable", - }, -) - -config_setting( - name = "intellij-cc-under-dev", - values = { - "define": "ij_product=intellij-cc-under-dev", - }, -) - -config_setting( - name = "intellij-ue-cc-oldest-stable", - values = { - "define": "ij_product=intellij-ue-cc-oldest-stable", - }, -) - -config_setting( - name = "intellij-ue-cc-latest-stable", - values = { - "define": "ij_product=intellij-ue-cc-latest-stable", - }, -) - -config_setting( - name = "intellij-ue-cc-under-dev", - values = { - "define": "ij_product=intellij-ue-cc-under-dev", - }, -) - # The purpose of this rule is to hide the versioning # complexity from users of this api. # There will be additional versions added in the future @@ -635,15 +184,6 @@ java_library( name = "plugin_api_internal", visibility = ["//visibility:private"], exports = select_from_plugin_api_directory( - android_studio = [ - ":sdk", - ":cidr_plugins", - ":java", - ":kotlin", - ":android", - ":test_recorder", - ":platform_images", - ], clion = [ ":sdk", ":clion_plugins", @@ -669,9 +209,6 @@ java_library( name = "plugin_api_for_tests", testonly = 1, data = select_from_plugin_api_directory( - android_studio = [ - ":kotlinc_version", - ], clion = [], # From 2022.1 forward, the version of kotlinc will be obtained # by KotlinPluginLayout from plugins/kotlin/kotlinc/build.txt @@ -701,7 +238,6 @@ java_library( java_library( name = "guava", exports = select_from_plugin_api_directory( - android_studio = [":guava"], clion = [":guava"], intellij = [":guava"], ), @@ -719,7 +255,7 @@ java_library( exports = [ "@diffutils//jar", "//third_party/java/truth" - ], + ], ) # IntelliJ Coverage plugin @@ -727,7 +263,6 @@ java_library( name = "coverage", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":coverage"], clion = [], intellij = [":coverage"], ), @@ -738,7 +273,6 @@ java_library( name = "coverage_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [":coverage"], clion = [], intellij = [":coverage"], ), @@ -749,7 +283,6 @@ java_library( name = "devkit", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":devkit"], clion = [], intellij = [":devkit"], ), @@ -760,7 +293,6 @@ java_library( name = "hg4idea", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":hg4idea"], clion = [":hg4idea"], intellij = [":hg4idea"], ), @@ -771,7 +303,6 @@ java_library( name = "intellilang_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":intellilang"], ), @@ -782,7 +313,6 @@ java_library( name = "kotlin", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":kotlin"], clion = [], intellij = [":kotlin"], ), @@ -793,7 +323,6 @@ java_library( name = "kotlin_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [":kotlin"], clion = [], intellij = [":kotlin"], ), @@ -804,7 +333,6 @@ java_library( name = "junit", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":junit"], clion = [], intellij = [":junit"], ), @@ -815,7 +343,6 @@ java_library( name = "terminal", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [":terminal"], clion = [":terminal"], intellij = [":terminal"], ), @@ -825,7 +352,6 @@ java_library( name = "terminal_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [":terminal"], clion = [":terminal"], intellij = [":terminal"], ), @@ -836,7 +362,6 @@ java_library( name = "bundled_plugins", testonly = 1, runtime_deps = select_from_plugin_api_directory( - android_studio = [":bundled_plugins"], clion = [":bundled_plugins"], intellij = [":bundled_plugins"], ), @@ -847,7 +372,6 @@ java_library( name = "shared_indexes", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":shared_indexes"], intellij_ue = [":shared_indexes"], @@ -859,7 +383,6 @@ java_library( name = "shared_indexes_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":shared_indexes"], intellij_ue = [":shared_indexes"], @@ -871,7 +394,6 @@ java_library( name = "git4idea", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":git4idea"], ), @@ -881,7 +403,6 @@ java_library( name = "git4idea_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":git4idea"], ), @@ -892,7 +413,6 @@ java_library( name = "cwm", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":cwm"], ), @@ -902,7 +422,6 @@ java_library( name = "cwm_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":cwm"], ), @@ -913,7 +432,6 @@ java_library( name = "maven", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":maven"], ), @@ -923,7 +441,6 @@ java_library( name = "maven_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":maven_bundled_plugins"], ), @@ -934,7 +451,6 @@ java_library( name = "maven_model", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":maven_model"], ), @@ -944,7 +460,6 @@ java_library( name = "maven_model_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":maven_model"], ), @@ -955,7 +470,6 @@ java_library( name = "yaml", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":yaml"], ), @@ -965,7 +479,6 @@ java_library( name = "yaml_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":yaml"], ), @@ -976,7 +489,6 @@ java_library( name = "gradle", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":gradle"], ), @@ -986,7 +498,6 @@ java_library( name = "gradle_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":gradle"], ), @@ -997,7 +508,6 @@ java_library( name = "database_tools", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [], intellij_ue = [":database_tools"], @@ -1008,7 +518,6 @@ java_library( name = "database_tools_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [], intellij_ue = [":database_tools"], @@ -1020,7 +529,6 @@ java_library( name = "javaee", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [], intellij_ue = [":javaee"], @@ -1031,7 +539,6 @@ java_library( name = "javaee_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [], intellij_ue = [":javaee"], @@ -1043,7 +550,6 @@ java_library( name = "markdown", neverlink = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":markdown"], ), @@ -1053,7 +559,6 @@ java_library( name = "markdown_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":markdown"], ), @@ -1063,7 +568,6 @@ java_library( name = "json_for_tests", testonly = 1, exports = select_from_plugin_api_directory( - android_studio = [], clion = [], intellij = [":json"], ), @@ -1072,7 +576,6 @@ java_library( filegroup( name = "application_info_json", srcs = select_from_plugin_api_directory( - android_studio = [":application_info_json"], clion = [":application_info_json"], intellij = [":application_info_json"], ), diff --git a/intellij_platform_sdk/BUILD.android_studio223 b/intellij_platform_sdk/BUILD.android_studio223 deleted file mode 100644 index 2f14cce9be9..00000000000 --- a/intellij_platform_sdk/BUILD.android_studio223 +++ /dev/null @@ -1,19 +0,0 @@ -# Description: -# -# Plugin source jars for Android Studio (version encoded in directory name) - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") -load("@//intellij_platform_sdk:android_studio.bzl", "android_studio") - -package(default_visibility = ["//visibility:public"]) - -licenses(["restricted"]) - -exports_files(["LICENSE"]) - -android_studio( - name = "android_studio", - major = "2022", - minor = "3", - revision = "1.19" -) diff --git a/intellij_platform_sdk/BUILD.android_studio231 b/intellij_platform_sdk/BUILD.android_studio231 deleted file mode 100644 index baf89db1545..00000000000 --- a/intellij_platform_sdk/BUILD.android_studio231 +++ /dev/null @@ -1,19 +0,0 @@ -# Description: -# -# Plugin source jars for Android Studio (version encoded in directory name) - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") -load("@//intellij_platform_sdk:android_studio.bzl", "android_studio") - -package(default_visibility = ["//visibility:public"]) - -licenses(["restricted"]) - -exports_files(["LICENSE"]) - -android_studio( - name = "android_studio", - major = "2023", - minor = "1", - revision = "1.21" -) diff --git a/intellij_platform_sdk/BUILD.android_studio232 b/intellij_platform_sdk/BUILD.android_studio232 deleted file mode 100644 index 5c8eebc7bcc..00000000000 --- a/intellij_platform_sdk/BUILD.android_studio232 +++ /dev/null @@ -1,19 +0,0 @@ -# Description: -# -# Plugin source jars for Android Studio (version encoded in directory name) - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") -load("@//intellij_platform_sdk:android_studio.bzl", "android_studio") - -package(default_visibility = ["//visibility:public"]) - -licenses(["restricted"]) - -exports_files(["LICENSE"]) - -android_studio( - name = "android_studio", - major = "2023", - minor = "2", - revision = "1.7" -) diff --git a/intellij_platform_sdk/BUILD.clion223 b/intellij_platform_sdk/BUILD.clion223 deleted file mode 100644 index e22d1eec581..00000000000 --- a/intellij_platform_sdk/BUILD.clion223 +++ /dev/null @@ -1,98 +0,0 @@ -# Description: -# -# Plugin source jars for CLion, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = glob([ - "lib/3rd-party-rt.jar", - ]), -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "clion_plugins", - jars = glob([ - "plugins/c-plugin/lib/*.jar", - "plugins/cidr-base-plugin/lib/*.jar", - "plugins/cidr-debugger-plugin/lib/*.jar", - "plugins/clion/lib/*.jar", - "plugins/clion-test-google/lib/*.jar", - "plugins/clion-test-catch/lib/*.jar", - "plugins/clion-test-boost/lib/*.jar", - "plugins/nativeDebug-plugin/lib/*.jar" - ]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob(["plugins/css-impl/lib/*.jar"]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "python", - jars = glob(["plugins/python-ce/lib/*.jar"]), -) - -filegroup( - name = "python_helpers", - srcs = glob(["plugins/python-ce/helpers/**/*"]), -) - -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/clion-ide/lib/clion-ide.jar", - "plugins/clion-ide/lib/modules/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.clion231 b/intellij_platform_sdk/BUILD.clion231 deleted file mode 100644 index e22d1eec581..00000000000 --- a/intellij_platform_sdk/BUILD.clion231 +++ /dev/null @@ -1,98 +0,0 @@ -# Description: -# -# Plugin source jars for CLion, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = glob([ - "lib/3rd-party-rt.jar", - ]), -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "clion_plugins", - jars = glob([ - "plugins/c-plugin/lib/*.jar", - "plugins/cidr-base-plugin/lib/*.jar", - "plugins/cidr-debugger-plugin/lib/*.jar", - "plugins/clion/lib/*.jar", - "plugins/clion-test-google/lib/*.jar", - "plugins/clion-test-catch/lib/*.jar", - "plugins/clion-test-boost/lib/*.jar", - "plugins/nativeDebug-plugin/lib/*.jar" - ]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob(["plugins/css-impl/lib/*.jar"]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "python", - jars = glob(["plugins/python-ce/lib/*.jar"]), -) - -filegroup( - name = "python_helpers", - srcs = glob(["plugins/python-ce/helpers/**/*"]), -) - -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/clion-ide/lib/clion-ide.jar", - "plugins/clion-ide/lib/modules/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.clion232 b/intellij_platform_sdk/BUILD.clion232 deleted file mode 100644 index 50a77b78ff9..00000000000 --- a/intellij_platform_sdk/BUILD.clion232 +++ /dev/null @@ -1,101 +0,0 @@ -# Description: -# -# Plugin source jars for CLion, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = glob([ - "lib/lib.jar", - "lib/lib-client.jar", - ]), -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "clion_plugins", - jars = glob([ - "plugins/c-plugin/lib/*.jar", - "plugins/cidr-base-plugin/lib/*.jar", - "plugins/cidr-debugger-plugin/lib/*.jar", - "plugins/clion/lib/*.jar", - "plugins/clion-test-google/lib/*.jar", - "plugins/clion-test-catch/lib/*.jar", - "plugins/clion-test-boost/lib/*.jar", - "plugins/nativeDebug-plugin/lib/*.jar", - "plugins/clion-ide/lib/clion-ide.jar", # For CMakeNotificationProvider - "plugins/clion-test-google-plugin/lib/clion-test-google-plugin.jar", # for com.jetbrains.cidr.execution.testing.google - ]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob(["plugins/css-impl/lib/*.jar"]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "python", - jars = glob(["plugins/python-ce/lib/*.jar"]), -) - -filegroup( - name = "python_helpers", - srcs = glob(["plugins/python-ce/helpers/**/*"]), -) - -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/clion-ide/lib/clion-ide.jar", - "plugins/clion-ide/lib/modules/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.clion233 b/intellij_platform_sdk/BUILD.clion233 deleted file mode 100644 index 50a77b78ff9..00000000000 --- a/intellij_platform_sdk/BUILD.clion233 +++ /dev/null @@ -1,101 +0,0 @@ -# Description: -# -# Plugin source jars for CLion, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = glob([ - "lib/lib.jar", - "lib/lib-client.jar", - ]), -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "clion_plugins", - jars = glob([ - "plugins/c-plugin/lib/*.jar", - "plugins/cidr-base-plugin/lib/*.jar", - "plugins/cidr-debugger-plugin/lib/*.jar", - "plugins/clion/lib/*.jar", - "plugins/clion-test-google/lib/*.jar", - "plugins/clion-test-catch/lib/*.jar", - "plugins/clion-test-boost/lib/*.jar", - "plugins/nativeDebug-plugin/lib/*.jar", - "plugins/clion-ide/lib/clion-ide.jar", # For CMakeNotificationProvider - "plugins/clion-test-google-plugin/lib/clion-test-google-plugin.jar", # for com.jetbrains.cidr.execution.testing.google - ]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob(["plugins/css-impl/lib/*.jar"]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "python", - jars = glob(["plugins/python-ce/lib/*.jar"]), -) - -filegroup( - name = "python_helpers", - srcs = glob(["plugins/python-ce/helpers/**/*"]), -) - -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/clion-ide/lib/clion-ide.jar", - "plugins/clion-ide/lib/modules/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.clion241 b/intellij_platform_sdk/BUILD.clion241 deleted file mode 100644 index cc1a8a4fdc7..00000000000 --- a/intellij_platform_sdk/BUILD.clion241 +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 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. - -# Description: -# -# Plugin source jars for CLion, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = glob([ - "lib/lib.jar", - "lib/lib-client.jar", - ]), -) - -java_import( - name = "clion_plugins", - jars = glob([ - "plugins/c-plugin/lib/*.jar", - "plugins/cidr-base-plugin/lib/*.jar", - "plugins/cidr-debugger-plugin/lib/*.jar", - "plugins/clion/lib/*.jar", - "plugins/clion-test-google/lib/*.jar", - "plugins/clion-test-catch/lib/*.jar", - "plugins/clion-test-boost/lib/*.jar", - "plugins/nativeDebug-plugin/lib/*.jar", - "plugins/clion-ide/lib/clion-ide.jar", # For CMakeNotificationProvider - "plugins/clion-test-google-plugin/lib/clion-test-google-plugin.jar", # for com.jetbrains.cidr.execution.testing.google - ]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-plugin/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob(["plugins/css-impl/lib/*.jar"]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "python", - jars = glob(["plugins/python-ce/lib/*.jar"]), -) - -filegroup( - name = "python_helpers", - srcs = glob(["plugins/python-ce/helpers/**/*"]), -) - -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/clion-ide/lib/clion-ide.jar", - "plugins/clion-ide/lib/modules/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.idea223 b/intellij_platform_sdk/BUILD.idea223 deleted file mode 100644 index 58765d18230..00000000000 --- a/intellij_platform_sdk/BUILD.idea223 +++ /dev/null @@ -1,118 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ CE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/3rd-party-rt.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "intellilang", - jars = [], -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.idea231 b/intellij_platform_sdk/BUILD.idea231 deleted file mode 100644 index 58765d18230..00000000000 --- a/intellij_platform_sdk/BUILD.idea231 +++ /dev/null @@ -1,118 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ CE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/3rd-party-rt.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "intellilang", - jars = [], -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.idea232 b/intellij_platform_sdk/BUILD.idea232 deleted file mode 100644 index af5b72ad262..00000000000 --- a/intellij_platform_sdk/BUILD.idea232 +++ /dev/null @@ -1,118 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ CE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "intellilang", - jars = [], -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.idea233 b/intellij_platform_sdk/BUILD.idea233 deleted file mode 100644 index 45f1df7813d..00000000000 --- a/intellij_platform_sdk/BUILD.idea233 +++ /dev/null @@ -1,118 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ CE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -#api232 -java_import( - name = "devkit", - jars = [], -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "intellilang", - jars = [], -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.idea241 b/intellij_platform_sdk/BUILD.idea241 deleted file mode 100644 index 17c06bf7826..00000000000 --- a/intellij_platform_sdk/BUILD.idea241 +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright 2024 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. - -# Description: -# -# Plugin source jars for IntelliJ CE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -#api232 -java_import( - name = "devkit", - jars = [], -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "intellilang", - jars = [], -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.ue223 b/intellij_platform_sdk/BUILD.ue223 deleted file mode 100644 index e5965488b4e..00000000000 --- a/intellij_platform_sdk/BUILD.ue223 +++ /dev/null @@ -1,152 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ UE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/3rd-party-rt.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob([ - "plugins/css-impl/lib/*.jar", - "plugins/platform-images/lib/*.jar", - ]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "angular", - jars = glob(["plugins/AngularJS/lib/*.jar"]), -) - -java_import( - name = "intellilang", - jars = glob(["plugins/IntelliLang/lib/*.jar"]), -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "protoeditor", - jars = glob(["plugins/protoeditor/lib/*.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - "plugins/indexing-shared-ultimate/lib/indexing-shared-ultimate.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.ue231 b/intellij_platform_sdk/BUILD.ue231 deleted file mode 100644 index e5965488b4e..00000000000 --- a/intellij_platform_sdk/BUILD.ue231 +++ /dev/null @@ -1,152 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ UE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/3rd-party-rt.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob([ - "plugins/css-impl/lib/*.jar", - "plugins/platform-images/lib/*.jar", - ]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "angular", - jars = glob(["plugins/AngularJS/lib/*.jar"]), -) - -java_import( - name = "intellilang", - jars = glob(["plugins/IntelliLang/lib/*.jar"]), -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "protoeditor", - jars = glob(["plugins/protoeditor/lib/*.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - "plugins/indexing-shared-ultimate/lib/indexing-shared-ultimate.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.ue232 b/intellij_platform_sdk/BUILD.ue232 deleted file mode 100644 index 3ad277c4c93..00000000000 --- a/intellij_platform_sdk/BUILD.ue232 +++ /dev/null @@ -1,152 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ UE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -java_import( - name = "devkit", - jars = glob(["plugins/devkit/lib/devkit.jar"]), -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob([ - "plugins/css-impl/lib/*.jar", - "plugins/platform-images/lib/*.jar", - ]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "angular", - jars = glob(["plugins/AngularJS/lib/*.jar"]), -) - -java_import( - name = "intellilang", - jars = glob(["plugins/IntelliLang/lib/*.jar"]), -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "protoeditor", - jars = glob(["plugins/protoeditor/lib/*.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - "plugins/indexing-shared-ultimate/lib/indexing-shared-ultimate.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/devkit/lib/*.jar", - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.ue233 b/intellij_platform_sdk/BUILD.ue233 deleted file mode 100644 index 18a48ea3916..00000000000 --- a/intellij_platform_sdk/BUILD.ue233 +++ /dev/null @@ -1,152 +0,0 @@ -# Description: -# -# Plugin source jars for IntelliJ UE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -#api232 -java_import( - name = "devkit", - jars = [], -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-impl/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob([ - "plugins/css-impl/lib/*.jar", - "plugins/platform-images/lib/*.jar", - ]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "angular", - jars = glob(["plugins/AngularJS/lib/*.jar"]), -) - -java_import( - name = "intellilang", - jars = glob(["plugins/IntelliLang/lib/*.jar"]), -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "protoeditor", - jars = glob(["plugins/protoeditor/lib/*.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - "plugins/indexing-shared-ultimate/lib/indexing-shared-ultimate.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/BUILD.ue241 b/intellij_platform_sdk/BUILD.ue241 deleted file mode 100644 index e6390187a37..00000000000 --- a/intellij_platform_sdk/BUILD.ue241 +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright 2024 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. - -# Description: -# -# Plugin source jars for IntelliJ UE, accessed remotely. - -load("@//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -package(default_visibility = ["//visibility:public"]) - -java_import( - name = "sdk", - jars = glob( - ["lib/*.jar"], - exclude = [ - # mockito-extensions needs to be removed from this jar. - "lib/testFramework.jar", - ], - ), - tags = ["intellij-provided-by-sdk"], - exports = [":jars_without_mockito_extensions"], - deps = ["@error_prone_annotations//jar"], -) - -no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = ["lib/testFramework.jar"], -) - -java_import( - name = "guava", - jars = ["lib/lib.jar", "lib/lib-client.jar"], -) - -java_library(name = "jsr305") # not bundled - -java_import( - name = "java", - jars = glob(["plugins/java/lib/*.jar"]) + ["plugins/java/lib/resources/jdkAnnotations.jar"], -) - -java_import( - name = "platform_images", - jars = glob(["plugins/platform-images/lib/*.jar"]), -) - -java_import( - name = "coverage", - jars = glob(["plugins/coverage/lib/*.jar"]), -) - -#api232 -java_import( - name = "devkit", - jars = [], -) - -java_import( - name = "hg4idea", - jars = glob(["plugins/hg4idea/lib/hg4idea.jar"]), -) - -java_import( - name = "javascript", - jars = glob(["plugins/javascript-plugin/lib/*.jar"]), -) - -java_import( - name = "css", - jars = glob([ - "plugins/css-impl/lib/*.jar", - "plugins/platform-images/lib/*.jar", - ]), -) - -java_import( - name = "tslint", - jars = glob(["plugins/tslint/lib/*.jar"]), -) - -java_import( - name = "angular", - jars = glob(["plugins/AngularJS/lib/*.jar"]), -) - -java_import( - name = "intellilang", - jars = glob(["plugins/IntelliLang/lib/*.jar"]), -) - -java_import( - name = "kotlin", - jars = glob(["plugins/Kotlin/lib/*.jar"]), -) - -filegroup( - name = "kotlinc_version", - srcs = ["plugins/Kotlin/kotlinc/build.txt"], -) - -java_import( - name = "junit", - jars = glob(["plugins/junit/lib/*.jar"]), -) - -java_import( - name = "terminal", - jars = glob(["plugins/terminal/lib/terminal.jar"]), -) - -java_import( - name = "protoeditor", - jars = glob(["plugins/protoeditor/lib/*.jar"]), -) - -java_import( - name = "shared_indexes", - jars = [ - "plugins/indexing-shared/lib/indexing-shared.jar", - "plugins/indexing-shared-ultimate/lib/indexing-shared-ultimate.jar", - ], -) - -java_import( - name = "git4idea", - jars = glob(["plugins/vcs-git/lib/*.jar"]), -) - -java_import( - name = "cwm", - jars = glob(["plugins/cwm-plugin/lib/*.jar"]), -) - -# The plugins required by IJwB. We need to include them -# when running integration tests. -java_import( - name = "bundled_plugins", - jars = glob([ - "plugins/java-i18n/lib/*.jar", - "plugins/junit/lib/*.jar", - "plugins/properties/lib/*.jar", - ]), - tags = ["intellij-provided-by-sdk"], -) - -java_import( - name = "json", - jars = glob(["plugins/json/lib/*.jar"]) -) - -filegroup( - name = "application_info_json", - srcs = ["product-info.json"], -) diff --git a/intellij_platform_sdk/android_studio.bzl b/intellij_platform_sdk/android_studio.bzl deleted file mode 100644 index 1118860d9c3..00000000000 --- a/intellij_platform_sdk/android_studio.bzl +++ /dev/null @@ -1,319 +0,0 @@ -""" -This module contains the rules that exposes a plugin api for android studio. -""" - -load("@rules_java//java:defs.bzl", "java_import", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "no_mockito_extensions") - -def _glob(files, dir, extension, recursive = False, exclude = []): - if files: - fail("Expected no files in _glob") - rec = "/**" if recursive else "" - return native.glob( - include = ["android-studio/" + dir + rec + "/*" + extension], - exclude = ["android-studio/" + f for f in exclude], - ) - -def _file_list(files, dir, extension, recursive = False, exclude = []): - ret = [] - for file in files: - if file in exclude: - continue - - file_dir, _, file_name = file.rpartition("/") - in_dir = file_dir == dir - if recursive: - in_dir = in_dir or file_dir.startswith(dir + "/") - - if in_dir and file_name.endswith(extension): - ret.append("android-studio/" + file) - return ret - -def android_studio( - name, - major = None, - minor = None, - revision = None, - filelist_bzl = None, - version_bzl = None, - tar = None, - zip = None, - files = None, - **kwargs): - """ - Macro that creates the rules to depend on for android studio plugin development - - If tar and files are given, the files are assumed to be compressed in a tar, - with files being the list of files. - - If not, android studio is assumed to be in the "android-studio" subdirectory. - - Args: - name: Currently unused, for backwards compatibility all rules are named top-level - major: The major version number. The 2023 in 2023.1.2.16 - minor: The minor version number. The 1 in 2023.1.2.16 - revision: The revision number. The 2.16 in 2023.1.2.16 - tar: the tar that contains android studio. - zip: the zip that contains android studio. - files: the list of files inside the tar. - """ - if tar and zip: - fail("Specify either tar or zip archive, not both.") - - if (tar or zip) and not files: - fail("When specifying archive you must specify a file list") - - if not tar and not zip and files: - fail("Files should only be specified together with an archive") - - if not files: - _android_studio(name, files, major, minor, revision, _glob, **kwargs) - else: - all_files = _android_studio(name, files, major, minor, revision, _file_list, **kwargs) - - if tar: - native.genrule( - name = name, - srcs = [tar], - outs = all_files, - cmd = "tar -xzvf $< -C $(RULEDIR) 1>/dev/null 2>&1 " + " ".join(all_files), - **kwargs - ) - elif zip: - native.genrule( - name = name, - outs = all_files, - tools = ["//third_party/unzip:unzip"], - srcs = [zip], - cmd = "$(location //third_party/unzip:unzip) -q $(location {}) -d $(RULEDIR) ".format(zip) + " ".join(all_files), - ) - -# Retuns if major.minor.revision is version or newer -def _version_equals_or_newer(major, minor, revision, version): - _version = [int(x) for x in version.split(".")] - _current = [int(major), int(minor)] + [int(x) for x in revision.split(".")] - for i in range(min(len(_version), len(_current))): - if _current[i] < _version[i]: - return False - elif _current[i] > _version[i]: - return True - return True - -def _android_studio(name, files, major, minor, revision, my_glob, **kwargs): - unpacked = [] - - # TODO: All these targets should be prefixed with ${name}, but for now keeping backwards compatibility. - kotlin_jars = my_glob(files, "plugins/Kotlin/lib", ".jar") - java_import( - name = "kotlin", - jars = kotlin_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += kotlin_jars - - terminal_jars = ["android-studio/plugins/terminal/lib/terminal.jar"] - java_import( - name = "terminal", - jars = terminal_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += terminal_jars - - java_jars = my_glob(files, "plugins/java/lib", ".jar") + ["android-studio/plugins/java/lib/resources/jdkAnnotations.jar"] - java_import( - name = "java", - jars = java_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += java_jars - - platform_images_jars = my_glob(files, "plugins/platform-images/lib", ".jar") - java_import( - name = "platform_images", - jars = platform_images_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += platform_images_jars - - devkit_jars = my_glob(files, "plugins/devkit/lib", ".jar") - java_import( - name = "devkit", - jars = devkit_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += devkit_jars - - hg4idea_jars = my_glob(files, "plugins/vcs-hg/lib", ".jar") - java_import( - name = "hg4idea", - jars = hg4idea_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += hg4idea_jars - - android_jars = ( - my_glob(files, "plugins/android/lib", ".jar") + - my_glob(files, "plugins/studio-bot/lib", ".jar") + - my_glob(files, "plugins/android-layoutlib/lib", ".jar") + - my_glob(files, "plugins/design-tools/lib", "design-tools.jar") + - my_glob(files, "plugins/android-wizardTemplate-plugin/lib", ".jar") + - my_glob(files, "plugins/android-wizardTemplate-impl/lib", ".jar") + - my_glob(files, "plugins/android-ndk/lib", ".jar") + - my_glob(files, "plugins/sdk-updates/lib", ".jar") - ) - java_import( - name = "android", - jars = android_jars, - tags = ["incomplete-deps"], - runtime_deps = [ - ":kotlin", - ], - **kwargs - ) - unpacked += android_jars - - # The plugins required by ASwB. We need to include them - # when running integration tests. - bundled_plugins_jars = ( - my_glob(files, "plugins/gradle/lib", ".jar") + - my_glob(files, "plugins/gradle-java/lib", ".jar") + - my_glob(files, "plugins/Groovy/lib", ".jar") + - my_glob(files, "plugins/java-i18n/lib", ".jar") + - my_glob(files, "plugins/junit/lib", ".jar") + - my_glob(files, "plugins/design-tools/lib", "layoutlib.jar") + - my_glob(files, "plugins/platform-langInjection/lib", ".jar") + - my_glob(files, "plugins/properties/lib", ".jar") + - my_glob(files, "plugins/smali/lib", ".jar") + - my_glob(files, "plugins/toml/lib", ".jar") + - my_glob(files, "plugins/webp/lib", ".jar") - ) - bundled_plugins_data = my_glob(files, "plugins/design-tools/resources/layoutlib", "", recursive = True) - java_import( - name = "bundled_plugins", - testonly = 1, - data = bundled_plugins_data, - jars = bundled_plugins_jars, - tags = [ - "incomplete-deps", - "intellij-provided-by-sdk", - ], - **kwargs - ) - unpacked += bundled_plugins_jars + bundled_plugins_data - - test_recorder_jars = my_glob(files, "plugins/test-recorder/lib", ".jar") - java_import( - name = "test_recorder", - jars = test_recorder_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += test_recorder_jars - - coverage_jars = my_glob(files, "plugins/java-coverage/lib", ".jar") - java_import( - name = "coverage", - jars = coverage_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += coverage_jars - - junit_jars = my_glob(files, "plugins/junit/lib", ".jar") - java_import( - name = "junit", - jars = junit_jars, - tags = ["incomplete-deps"], - **kwargs - ) - # unpacked += junit_jars # Already present in the bundled_plugins - - sdk_import_jars = my_glob(files, "lib", ".jar", exclude = [ - "lib/junit4.jar", # Plugin code shouldn't need junit, and plugin tests may be driven by a different version. - "lib/junit.jar", # Exclude to avoid warnings: "Multiple versions of JUnit detected on classpath". - "lib/testFramework.jar", - "lib/bouncy-castle.jar", - ]) # b/183925215: mockito-extensions needs to be removed from these jars. - java_import( - name = "sdk_import", - jars = sdk_import_jars, - tags = [ - "incomplete-deps", - "intellij-provided-by-sdk", - ], - deps = [ - # guava v20+ requires this at compile-time when using annotation processors. - "@error_prone_annotations//jar", - ], - **kwargs - ) - unpacked += sdk_import_jars - - cidr_plugins_jars = ( - my_glob(files, "plugins/c-plugin/lib", ".jar") + # com.intellij.cidr.lang: C/C++ Language Support - my_glob(files, "plugins/cidr-base-plugin/lib", ".jar") + # com.intellij.cidr.base: CIDR Base - my_glob(files, "plugins/cidr-debugger-plugin/lib", ".jar") # com.jetbrains.cidr.execution.debugger: CIDR Debugger - ) - if _version_equals_or_newer(major, minor, revision, "2023.2"): - cidr_plugins_jars += my_glob(files, "plugins/c-clangd-plugin/lib", ".jar") # required for NDK debugging - else: - cidr_plugins_jars += my_glob(files, "plugins/c-clangd/lib", ".jar") # required for NDK debugging - java_import( - name = "cidr_plugins", - jars = cidr_plugins_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += cidr_plugins_jars - - if _version_equals_or_newer(major, minor, revision, "2023.2"): - guava_jars = ["android-studio/lib/lib.jar"] - else: - guava_jars = ["android-studio/lib/3rd-party-rt.jar"] - java_import( - name = "guava", - jars = guava_jars, - tags = ["incomplete-deps"], - **kwargs - ) - # unpacked += guava_jars # Already extracted in sdk_import - - java_library( - name = "sdk", - exports = [ - ":jars_without_mockito_extensions", - ":sdk_import", - ], - **kwargs - ) - - no_mockito_extensions_jars = ["android-studio/lib/testFramework.jar"] - no_mockito_extensions( - name = "jars_without_mockito_extensions", - jars = no_mockito_extensions_jars, - tags = ["incomplete-deps"], - **kwargs - ) - unpacked += no_mockito_extensions_jars - - native.filegroup( - name = "application_info_json", - srcs = ["android-studio/product-info.json"], - **kwargs - ) - unpacked.append("android-studio/product-info.json") - - native.filegroup( - name = "kotlinc_version", - srcs = ["android-studio/plugins/Kotlin/kotlinc/build.txt"], - **kwargs - ) - unpacked.append("android-studio/plugins/Kotlin/kotlinc/build.txt") - - return unpacked diff --git a/intellij_platform_sdk/build_defs.bzl b/intellij_platform_sdk/build_defs.bzl index 7c6abded5b8..02f2b79b03e 100644 --- a/intellij_platform_sdk/build_defs.bzl +++ b/intellij_platform_sdk/build_defs.bzl @@ -4,71 +4,20 @@ load("@rules_java//java:defs.bzl", "java_import") # The current indirect ij_product mapping (eg. "intellij-latest") INDIRECT_IJ_PRODUCTS = { - # Indirect ij_product mapping for internal Blaze Plugin - "intellij-latest": "intellij-2022.3", - "intellij-latest-mac": "intellij-2022.3-mac", - "intellij-beta": "intellij-2022.3", - "intellij-under-dev": "intellij-2022.3", - "intellij-ue-latest": "intellij-ue-2022.3", - "intellij-ue-latest-mac": "intellij-ue-2022.3-mac", - "intellij-ue-beta": "intellij-ue-2022.3", - "intellij-ue-under-dev": "intellij-ue-2022.3", - "android-studio-latest": "android-studio-2023.1", - "android-studio-latest-mac": "android-studio-2023.1-mac", - "android-studio-beta": "android-studio-2023.1", - "android-studio-beta-mac": "android-studio-2023.1-mac", - "android-studio-canary": "android-studio-2023.2", - "android-studio-canary-mac": "android-studio-2023.2-mac", - "clion-latest": "clion-2022.3", - "clion-latest-mac": "clion-2022.3-mac", - "clion-beta": "clion-2022.3", - "clion-under-dev": "clion-2022.3", - # Indirect ij_product mapping for Bazel Plugin OSS - # The old names for -oss-oldest-stable and -oss-latest-stable were - # -oss-stable and -oss-beta respectively. "intellij-oss-oldest-stable": "intellij-2024.2", "intellij-oss-latest-stable": "intellij-2024.3", "intellij-oss-under-dev": "intellij-2024.3", "intellij-ue-oss-oldest-stable": "intellij-ue-2024.2", "intellij-ue-oss-latest-stable": "intellij-ue-2024.3", "intellij-ue-oss-under-dev": "intellij-ue-2024.3", - "android-studio-oss-oldest-stable": "android-studio-2023.1", - "android-studio-oss-latest-stable": "android-studio-2023.2", - "android-studio-oss-under-dev": "android-studio-2023.2", "clion-oss-oldest-stable": "clion-2024.2", "clion-oss-latest-stable": "clion-2024.3", "clion-oss-under-dev": "clion-2024.3", - # Indirect ij_product mapping for Cloud Code Plugin OSS - "intellij-cc-oldest-stable": "intellij-2022.3", - "intellij-cc-latest-stable": "intellij-2022.3", - "intellij-cc-under-dev": "intellij-2022.3", - "intellij-ue-cc-oldest-stable": "intellij-ue-2022.3", - "intellij-ue-cc-latest-stable": "intellij-ue-2022.3", - "intellij-ue-cc-under-dev": "intellij-ue-2022.3", } (CHANNEL_STABLE, CHANNEL_BETA, CHANNEL_CANARY, CHANNEL_FREEFORM) = ("stable", "beta", "canary", "freeform") INDIRECT_PRODUCT_CHANNELS = { - # Channel mapping for internal Blaze Plugin - "intellij-latest": CHANNEL_STABLE, - "intellij-latest-mac": CHANNEL_STABLE, - "intellij-beta": CHANNEL_BETA, - "intellij-under-dev": CHANNEL_CANARY, - "intellij-ue-latest": CHANNEL_STABLE, - "intellij-ue-latest-mac": CHANNEL_STABLE, - "intellij-ue-beta": CHANNEL_BETA, - "intellij-ue-under-dev": CHANNEL_CANARY, - "android-studio-latest": CHANNEL_STABLE, - "android-studio-latest-mac": CHANNEL_STABLE, - "android-studio-beta": CHANNEL_BETA, - "android-studio-beta-mac": CHANNEL_BETA, - "android-studio-canary": CHANNEL_CANARY, - "android-studio-canary-mac": CHANNEL_CANARY, - "clion-latest": CHANNEL_STABLE, - "clion-latest-mac": CHANNEL_STABLE, - "clion-beta": CHANNEL_BETA, - "clion-under-dev": CHANNEL_CANARY, # Channel mapping for Bazel Plugin OSS "intellij-oss-oldest-stable": CHANNEL_STABLE, "intellij-oss-latest-stable": CHANNEL_STABLE, @@ -76,19 +25,9 @@ INDIRECT_PRODUCT_CHANNELS = { "intellij-ue-oss-oldest-stable": CHANNEL_STABLE, "intellij-ue-oss-latest-stable": CHANNEL_STABLE, "intellij-ue-oss-under-dev": CHANNEL_CANARY, - "android-studio-oss-oldest-stable": CHANNEL_STABLE, - "android-studio-oss-latest-stable": CHANNEL_STABLE, - "android-studio-oss-under-dev": CHANNEL_CANARY, "clion-oss-oldest-stable": CHANNEL_STABLE, "clion-oss-latest-stable": CHANNEL_STABLE, "clion-oss-under-dev": CHANNEL_CANARY, - # Channel mapping for Cloud Code Plugin OSS - "intellij-cc-oldest-stable": CHANNEL_STABLE, - "intellij-cc-latest-stable": CHANNEL_STABLE, - "intellij-cc-under-dev": CHANNEL_CANARY, - "intellij-ue-cc-oldest-stable": CHANNEL_STABLE, - "intellij-ue-cc-latest-stable": CHANNEL_STABLE, - "intellij-ue-cc-under-dev": CHANNEL_CANARY, } def _check_channel_map(): @@ -106,46 +45,6 @@ def _check_channel_map(): fail("Unexpected values in INDIRECT_PRODUCT_CHANNELS: %s" % unexpected) DIRECT_IJ_PRODUCTS = { - "intellij-2022.3": struct( - ide = "intellij", - directory = "intellij_ce_2022_3", - ), - "intellij-2022.3-mac": struct( - ide = "intellij", - directory = "intellij_ce_2022_3", - ), - "intellij-2023.1": struct( - ide = "intellij", - directory = "intellij_ce_2023_1", - ), - "intellij-2023.1-mac": struct( - ide = "intellij", - directory = "intellij_ce_2023_1", - ), - "intellij-2023.2": struct( - ide = "intellij", - directory = "intellij_ce_2023_2", - ), - "intellij-2023.2-mac": struct( - ide = "intellij", - directory = "intellij_ce_2023_2", - ), - "intellij-2023.3": struct( - ide = "intellij", - directory = "intellij_ce_2023_3", - ), - "intellij-2023.3-mac": struct( - ide = "intellij", - directory = "intellij_ce_2023_3", - ), - "intellij-2024.1": struct( - ide = "intellij", - directory = "intellij_ce_2024_1", - ), - "intellij-2024.1-mac": struct( - ide = "intellij", - directory = "intellij_ce_2024_1", - ), "intellij-2024.2": struct( ide = "intellij", directory = "intellij_ce_2024_2", @@ -162,46 +61,6 @@ DIRECT_IJ_PRODUCTS = { ide = "intellij", directory = "intellij_ce_2024_3", ), - "intellij-ue-2022.3": struct( - ide = "intellij-ue", - directory = "intellij_ue_2022_3", - ), - "intellij-ue-2022.3-mac": struct( - ide = "intellij-ue", - directory = "intellij_ue_2022_3", - ), - "intellij-ue-2023.1": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_1", - ), - "intellij-ue-2023.1-mac": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_1", - ), - "intellij-ue-2023.2": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_2", - ), - "intellij-ue-2023.2-mac": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_2", - ), - "intellij-ue-2023.3": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_3", - ), - "intellij-ue-2023.3-mac": struct( - ide = "intellij-ue", - directory = "intellij_ue_2023_3", - ), - "intellij-ue-2024.1": struct( - ide = "intellij-ue", - directory = "intellij_ue_2024_1", - ), - "intellij-ue-2024.1-mac": struct( - ide = "intellij-ue", - directory = "intellij_ue_2024_1", - ), "intellij-ue-2024.2": struct( ide = "intellij-ue", directory = "intellij_ue_2024_2", @@ -218,61 +77,6 @@ DIRECT_IJ_PRODUCTS = { ide = "intellij-ue", directory = "intellij_ue_2024_3", ), - "android-studio-2022.3": struct( - ide = "android-studio", - archive = "android_studio_with_blaze_2022_3", - oss_workspace = "android_studio_2022_3", - ), - "android-studio-2023.1": struct( - ide = "android-studio", - archive = "android_studio_with_blaze_2023_1", - oss_workspace = "android_studio_2023_1", - ), - "android-studio-2023.2": struct( - ide = "android-studio", - archive = "android_studio_with_blaze_2023_2", - oss_workspace = "android_studio_2023_2", - ), - "clion-2022.3": struct( - ide = "clion", - directory = "clion_2022_3", - ), - "clion-2022.3-mac": struct( - ide = "clion", - directory = "clion_2022_3", - ), - "clion-2023.1": struct( - ide = "clion", - directory = "clion_2023_1", - ), - "clion-2023.1-mac": struct( - ide = "clion", - directory = "clion_2023_1", - ), - "clion-2023.2": struct( - ide = "clion", - directory = "clion_2023_2", - ), - "clion-2023.2-mac": struct( - ide = "clion", - directory = "clion_2023_2", - ), - "clion-2023.3": struct( - ide = "clion", - directory = "clion_2023_3", - ), - "clion-2023.3-mac": struct( - ide = "clion", - directory = "clion_2023_3", - ), - "clion-2024.1": struct( - ide = "clion", - directory = "clion_2024_1", - ), - "clion-2024.1-mac": struct( - ide = "clion", - directory = "clion_2024_1", - ), "clion-2024.2": struct( ide = "clion", directory = "clion_2024_2", @@ -356,7 +160,7 @@ def _do_select_for_plugin_api(params): no_match_error = "define an intellij product version, e.g. --define=ij_product=intellij-latest", ) -def select_for_ide(intellij = None, intellij_ue = None, android_studio = None, clion = None, default = []): +def select_for_ide(intellij = None, intellij_ue = None, clion = None, default = []): """Selects for the supported IDEs. Args: @@ -379,13 +183,11 @@ def select_for_ide(intellij = None, intellij_ue = None, android_studio = None, c """ intellij = intellij if intellij != None else default intellij_ue = intellij_ue if intellij_ue != None else intellij - android_studio = android_studio if android_studio != None else default clion = clion if clion != None else default ide_to_value = { "intellij": intellij, "intellij-ue": intellij_ue, - "android-studio": android_studio, "clion": clion, } @@ -404,12 +206,11 @@ def _plugin_api_directory(value): directory = value.directory return "@" + directory + "//" -def select_from_plugin_api_directory(intellij, android_studio, clion, intellij_ue = None): +def select_from_plugin_api_directory(intellij, clion, intellij_ue = None): """Internal convenience method to generate select statement from the IDE's plugin_api directories. Args: intellij: the items that IntelliJ product to use. - android_studio: the items that android studio product to use. clion: the items that clion product to use. intellij_ue: the items that intellij ue product to use. @@ -421,7 +222,6 @@ def select_from_plugin_api_directory(intellij, android_studio, clion, intellij_u ide_to_value = { "intellij": intellij, "intellij-ue": intellij_ue if intellij_ue else intellij, - "android-studio": android_studio, "clion": clion, } @@ -431,7 +231,7 @@ def select_from_plugin_api_directory(intellij, android_studio, clion, intellij_u params[ij_product] = [_plugin_api_directory(value) + item for item in ide_to_value[value.ide]] # No ij_product == intellij-latest - params["default"] = params[INDIRECT_IJ_PRODUCTS["intellij-latest"]] + params["default"] = params[INDIRECT_IJ_PRODUCTS["intellij-oss-latest-stable"]] return select_for_plugin_api(params) diff --git a/sdkcompat/BUILD b/sdkcompat/BUILD index 9a1b6659584..d346951b1d2 100644 --- a/sdkcompat/BUILD +++ b/sdkcompat/BUILD @@ -16,29 +16,11 @@ java_library( name = "sdkcompat", visibility = SDK_COMPAT_VISIBILITY, exports = select_for_plugin_api({ - "clion-2024.3": ["//sdkcompat/v243"], - "intellij-ue-2024.3": ["//sdkcompat/v243"], - "intellij-2024.3": ["//sdkcompat/v243"], - "android-studio-2022.3": ["//sdkcompat/v223"], - "android-studio-2023.1": ["//sdkcompat/v231"], - "android-studio-2023.2": ["//sdkcompat/v232"], - "intellij-2022.3": ["//sdkcompat/v223"], - "intellij-ue-2022.3": ["//sdkcompat/v223"], - "intellij-2023.1": ["//sdkcompat/v231"], - "intellij-ue-2023.1": ["//sdkcompat/v231"], - "intellij-2023.2": ["//sdkcompat/v232"], - "intellij-ue-2023.2": ["//sdkcompat/v232"], - "intellij-2023.3": ["//sdkcompat/v233"], - "intellij-ue-2023.3": ["//sdkcompat/v233"], - "intellij-2024.1": ["//sdkcompat/v241"], - "intellij-ue-2024.1": ["//sdkcompat/v241"], "intellij-2024.2": ["//sdkcompat/v242"], "intellij-ue-2024.2": ["//sdkcompat/v242"], - "clion-2022.3": ["//sdkcompat/v223"], - "clion-2023.1": ["//sdkcompat/v231"], - "clion-2023.2": ["//sdkcompat/v232"], - "clion-2023.3": ["//sdkcompat/v233"], - "clion-2024.1": ["//sdkcompat/v241"], + "intellij-2024.3": ["//sdkcompat/v243"], + "intellij-ue-2024.3": ["//sdkcompat/v243"], "clion-2024.2": ["//sdkcompat/v242"], + "clion-2024.3": ["//sdkcompat/v243"], }), ) diff --git a/sdkcompat/v243/BUILD b/sdkcompat/v243/BUILD index aaa83f1a8e1..4d914aab5d9 100644 --- a/sdkcompat/v243/BUILD +++ b/sdkcompat/v243/BUILD @@ -36,12 +36,6 @@ java_library( "com/google/idea/sdkcompat/python/**", "com/google/idea/sdkcompat/ui/icons/**", ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], clion = glob([ "com/google/idea/sdkcompat/cpp/**", "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio diff --git a/testing/BUILD b/testing/BUILD index 8111bc0fa20..6afded432ed 100644 --- a/testing/BUILD +++ b/testing/BUILD @@ -20,49 +20,7 @@ licenses(["notice"]) java_library( name = "lib", testonly = 1, - srcs = glob(["src/**/*.java"]) + - select_for_ide( - android_studio = glob([ - "studio/**/*.java", - "cidr/**/*.java", - ]), - default = [], - ) + select_for_plugin_api({ - "android-studio-2022.3": glob([ - "testcompat/v223/com/google/idea/sdkcompat/**/*.java", - "testcompat/v223/com/google/idea/testing/**/*.java", - "testcompat/v223/com/google/idea/java/**/*.java", - ]), - "android-studio-2023.1": glob([ - "testcompat/v231/com/google/idea/sdkcompat/**/*.java", - "testcompat/v231/com/google/idea/testing/**/*.java", - "testcompat/v231/com/google/idea/java/**/*.java", - ]), - "android-studio-2023.2": glob([ - "testcompat/v232/com/google/idea/sdkcompat/**/*.java", - "testcompat/v232/com/google/idea/testing/**/*.java", - "testcompat/v232/com/google/idea/java/**/*.java", - ]), - "clion-2022.3": glob([ - "testcompat/v223/com/google/idea/sdkcompat/**/*.java", - "testcompat/v223/com/google/idea/testing/*.java", - ]), - "clion-2023.1": glob([ - "testcompat/v231/com/google/idea/sdkcompat/**/*.java", - "testcompat/v231/com/google/idea/testing/*.java", - ]), - "clion-2023.2": glob([ - "testcompat/v232/com/google/idea/sdkcompat/**/*.java", - "testcompat/v232/com/google/idea/testing/*.java", - ]), - "clion-2023.3": glob([ - "testcompat/v233/com/google/idea/sdkcompat/**/*.java", - "testcompat/v233/com/google/idea/testing/*.java", - ]), - "clion-2024.1": glob([ - "testcompat/v241/com/google/idea/sdkcompat/**/*.java", - "testcompat/v241/com/google/idea/testing/*.java", - ]), + srcs = glob(["src/**/*.java"]) + select_for_plugin_api({ "clion-2024.2": glob([ "testcompat/v242/com/google/idea/sdkcompat/**/*.java", "testcompat/v242/com/google/idea/testing/*.java", @@ -71,56 +29,6 @@ java_library( "testcompat/v243/com/google/idea/sdkcompat/**/*.java", "testcompat/v243/com/google/idea/testing/*.java", ]), - "intellij-2022.3": glob([ - "testcompat/v223/com/google/idea/sdkcompat/**/*.java", - "testcompat/v223/com/google/idea/testing/**/*.java", - "testcompat/v223/com/google/idea/java/**/*.java", - ]), - "intellij-ue-2022.3": glob([ - "testcompat/v223/com/google/idea/sdkcompat/**/*.java", - "testcompat/v223/com/google/idea/testing/**/*.java", - "testcompat/v223/com/google/idea/java/**/*.java", - ]), - "intellij-2023.1": glob([ - "testcompat/v231/com/google/idea/sdkcompat/**/*.java", - "testcompat/v231/com/google/idea/testing/**/*.java", - "testcompat/v231/com/google/idea/java/**/*.java", - ]), - "intellij-ue-2023.1": glob([ - "testcompat/v231/com/google/idea/sdkcompat/**/*.java", - "testcompat/v231/com/google/idea/testing/**/*.java", - "testcompat/v231/com/google/idea/java/**/*.java", - ]), - "intellij-2023.2": glob([ - "testcompat/v232/com/google/idea/sdkcompat/**/*.java", - "testcompat/v232/com/google/idea/testing/**/*.java", - "testcompat/v232/com/google/idea/java/**/*.java", - ]), - "intellij-ue-2023.2": glob([ - "testcompat/v232/com/google/idea/sdkcompat/**/*.java", - "testcompat/v232/com/google/idea/testing/**/*.java", - "testcompat/v232/com/google/idea/java/**/*.java", - ]), - "intellij-2023.3": glob([ - "testcompat/v233/com/google/idea/sdkcompat/**/*.java", - "testcompat/v233/com/google/idea/testing/**/*.java", - "testcompat/v233/com/google/idea/java/**/*.java", - ]), - "intellij-ue-2023.3": glob([ - "testcompat/v233/com/google/idea/sdkcompat/**/*.java", - "testcompat/v233/com/google/idea/testing/**/*.java", - "testcompat/v233/com/google/idea/java/**/*.java", - ]), - "intellij-2024.1": glob([ - "testcompat/v241/com/google/idea/sdkcompat/**/*.java", - "testcompat/v241/com/google/idea/testing/**/*.java", - "testcompat/v241/com/google/idea/java/**/*.java", - ]), - "intellij-ue-2024.1": glob([ - "testcompat/v241/com/google/idea/sdkcompat/**/*.java", - "testcompat/v241/com/google/idea/testing/**/*.java", - "testcompat/v241/com/google/idea/java/**/*.java", - ]), "intellij-2024.2": glob([ "testcompat/v242/com/google/idea/sdkcompat/**/*.java", "testcompat/v242/com/google/idea/testing/**/*.java", diff --git a/third_party/devkit/BUILD b/third_party/devkit/BUILD index 20999026912..c824aa55428 100644 --- a/third_party/devkit/BUILD +++ b/third_party/devkit/BUILD @@ -4,10 +4,6 @@ java_library( name = "devkit_internal", visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "intellij-2023.3": ["@devkit_2023_3//:devkit"], - "intellij-ue-2023.3": ["@devkit_2023_3//:devkit"], - "intellij-2024.1": ["@devkit_2024_1//:devkit"], - "intellij-ue-2024.1": ["@devkit_2024_1//:devkit"], "intellij-2024.2": ["@devkit_2024_2//:devkit"], "intellij-ue-2024.2": ["@devkit_2024_2//:devkit"], "intellij-2024.3": ["@devkit_2024_3//:devkit"], diff --git a/third_party/go/BUILD b/third_party/go/BUILD index 4421233bfa2..514eee741da 100644 --- a/third_party/go/BUILD +++ b/third_party/go/BUILD @@ -8,20 +8,10 @@ java_library( name = "go_internal", visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "intellij-ue-2024.3": ["@go_2024_3//:go"], - "intellij-2024.3": ["@go_2024_3//:go"], - "intellij-2022.3": ["@go_2022_3//:go"], - "intellij-ue-2022.3": ["@go_2022_3//:go"], - "intellij-2023.1": ["@go_2023_1//:go"], - "intellij-ue-2023.1": ["@go_2023_1//:go"], - "intellij-2023.2": ["@go_2023_2//:go"], - "intellij-ue-2023.2": ["@go_2023_2//:go"], - "intellij-2023.3": ["@go_2023_3//:go"], - "intellij-ue-2023.3": ["@go_2023_3//:go"], - "intellij-2024.1": ["@go_2024_1//:go"], - "intellij-ue-2024.1": ["@go_2024_1//:go"], "intellij-2024.2": ["@go_2024_2//:go"], "intellij-ue-2024.2": ["@go_2024_2//:go"], + "intellij-2024.3": ["@go_2024_3//:go"], + "intellij-ue-2024.3": ["@go_2024_3//:go"], "default": [], }), ) diff --git a/third_party/javascript/BUILD b/third_party/javascript/BUILD index 10fe811c15a..8a2868ecb8b 100644 --- a/third_party/javascript/BUILD +++ b/third_party/javascript/BUILD @@ -9,20 +9,10 @@ java_library( tags = ["no-ide"], visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "clion-2024.3": ["@clion_2024_3//:javascript"], - "intellij-ue-2024.3": ["@intellij_ue_2024_3//:javascript"], - "intellij-ue-2022.3": ["@intellij_ue_2022_3//:javascript"], - "intellij-ue-2023.1": ["@intellij_ue_2023_1//:javascript"], - "intellij-ue-2023.2": ["@intellij_ue_2023_2//:javascript"], - "intellij-ue-2023.3": ["@intellij_ue_2023_3//:javascript"], - "intellij-ue-2024.1": ["@intellij_ue_2024_1//:javascript"], "intellij-ue-2024.2": ["@intellij_ue_2024_2//:javascript"], - "clion-2022.3": ["@clion_2022_3//:javascript"], - "clion-2023.1": ["@clion_2023_1//:javascript"], - "clion-2023.2": ["@clion_2023_2//:javascript"], - "clion-2023.3": ["@clion_2023_3//:javascript"], - "clion-2024.1": ["@clion_2024_1//:javascript"], + "intellij-ue-2024.3": ["@intellij_ue_2024_3//:javascript"], "clion-2024.2": ["@clion_2024_2//:javascript"], + "clion-2024.3": ["@clion_2024_3//:javascript"], "default": [], }), ) @@ -32,20 +22,10 @@ java_library( tags = ["no-ide"], visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "clion-2024.3": ["@clion_2024_3//:css"], - "intellij-ue-2024.3": ["@intellij_ue_2024_3//:css"], - "intellij-ue-2022.3": ["@intellij_ue_2022_3//:css"], - "intellij-ue-2023.1": ["@intellij_ue_2023_1//:css"], - "intellij-ue-2023.2": ["@intellij_ue_2023_2//:css"], - "intellij-ue-2023.3": ["@intellij_ue_2023_3//:css"], - "intellij-ue-2024.1": ["@intellij_ue_2024_1//:css"], "intellij-ue-2024.2": ["@intellij_ue_2024_2//:css"], - "clion-2022.3": ["@clion_2022_3//:css"], - "clion-2023.1": ["@clion_2023_1//:css"], - "clion-2023.2": ["@clion_2023_2//:css"], - "clion-2023.3": ["@clion_2023_3//:css"], - "clion-2024.1": ["@clion_2024_1//:css"], + "intellij-ue-2024.3": ["@intellij_ue_2024_3//:css"], "clion-2024.2": ["@clion_2024_2//:css"], + "clion-2024.3": ["@clion_2024_3//:css"], "default": [], }), ) @@ -55,18 +35,10 @@ java_library( tags = ["no-ide"], visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "clion-2024.3": ["@clion_2024_3//:tslint"], - "intellij-ue-2024.3": ["@intellij_ue_2024_3//:tslint"], - "intellij-ue-2022.3": ["@intellij_ue_2022_3//:tslint"], - "intellij-ue-2023.1": ["@intellij_ue_2023_1//:tslint"], - "intellij-ue-2023.2": ["@intellij_ue_2023_2//:tslint"], - "intellij-ue-2023.3": ["@intellij_ue_2023_3//:tslint"], "intellij-ue-2024.2": ["@intellij_ue_2024_2//:tslint"], - "clion-2022.3": ["@clion_2022_3//:tslint"], - "clion-2023.1": ["@clion_2023_1//:tslint"], - "clion-2023.2": ["@clion_2023_2//:tslint"], - "clion-2023.3": ["@clion_2023_3//:tslint"], + "intellij-ue-2024.3": ["@intellij_ue_2024_3//:tslint"], "clion-2024.2": ["@clion_2024_2//:tslint"], + "clion-2024.3": ["@clion_2024_3//:tslint"], "default": [], }), ) @@ -76,16 +48,8 @@ java_library( tags = ["no-ide"], visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "intellij-ue-2024.3": ["@intellij_ue_2024_3//:angular"], - "intellij-ue-2022.3": ["@intellij_ue_2022_3//:angular"], - "intellij-ue-2023.1": ["@intellij_ue_2023_1//:angular"], - "intellij-ue-2023.2": ["@intellij_ue_2023_2//:angular"], - "intellij-ue-2023.3": ["@intellij_ue_2023_3//:angular"], "intellij-ue-2024.2": ["@intellij_ue_2024_2//:angular"], - "clion-2022.3": ["@intellij_ue_2022_3//:angular"], - "clion-2023.1": ["@intellij_ue_2023_1//:angular"], - "clion-2023.2": ["@intellij_ue_2023_2//:angular"], - "clion-2023.3": ["@intellij_ue_2023_3//:angular"], + "intellij-ue-2024.3": ["@intellij_ue_2024_3//:angular"], "default": [], }), ) diff --git a/third_party/python/BUILD b/third_party/python/BUILD index 2531f040f04..dbe3da3f03a 100644 --- a/third_party/python/BUILD +++ b/third_party/python/BUILD @@ -8,60 +8,24 @@ java_library( name = "python_internal", visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "clion-2024.3": ["@python_2024_3//:python"], - "intellij-ue-2024.3": ["@python_2024_3//:python"], - "intellij-2024.3": ["@python_2024_3//:python"], - "intellij-2022.3": ["@python_2022_3//:python"], - "intellij-ue-2022.3": ["@python_2022_3//:python"], - "intellij-2023.1": ["@python_2023_1//:python"], - "intellij-ue-2023.1": ["@python_2023_1//:python"], - "intellij-2023.2": ["@python_2023_2//:python"], - "intellij-ue-2023.2": ["@python_2023_2//:python"], - "intellij-2023.3": ["@python_2023_3//:python"], - "intellij-ue-2023.3": ["@python_2023_3//:python"], - "intellij-2024.1": ["@python_2024_1//:python"], - "intellij-ue-2024.1": ["@python_2024_1//:python"], "intellij-2024.2": ["@python_2024_2//:python"], "intellij-ue-2024.2": ["@python_2024_2//:python"], - "clion-2022.3": ["@clion_2022_3//:python"], - "clion-2023.1": ["@clion_2023_1//:python"], - "clion-2023.2": ["@clion_2023_2//:python"], - "clion-2023.3": ["@clion_2023_3//:python"], - "clion-2024.1": ["@clion_2024_1//:python"], + "intellij-2024.3": ["@python_2024_3//:python"], + "intellij-ue-2024.3": ["@python_2024_3//:python"], "clion-2024.2": ["@python_2024_2//:python"], - "android-studio-2022.3": ["@python_2022_3//:python"], - "android-studio-2023.1": ["@python_2023_1//:python"], - "android-studio-2023.2": ["@python_2023_2//:python"], + "clion-2024.3": ["@python_2024_3//:python"], }), ) filegroup( name = "python_helpers", srcs = select_for_plugin_api({ - "clion-2024.3": ["@python_2024_3//:python_helpers"], - "intellij-ue-2024.3": ["@python_2024_3//:python_helpers"], - "intellij-2024.3": ["@python_2024_3//:python_helpers"], - "intellij-2022.3": ["@python_2022_3//:python_helpers"], - "intellij-ue-2022.3": ["@python_2022_3//:python_helpers"], - "intellij-2023.1": ["@python_2023_1//:python_helpers"], - "intellij-ue-2023.1": ["@python_2023_1//:python_helpers"], - "intellij-2023.2": ["@python_2023_2//:python_helpers"], - "intellij-ue-2023.2": ["@python_2023_2//:python_helpers"], - "intellij-2023.3": ["@python_2023_3//:python_helpers"], - "intellij-ue-2023.3": ["@python_2023_3//:python_helpers"], - "intellij-2024.1": ["@python_2024_1//:python_helpers"], - "intellij-ue-2024.1": ["@python_2024_1//:python_helpers"], "intellij-2024.2": ["@python_2024_2//:python_helpers"], "intellij-ue-2024.2": ["@python_2024_2//:python_helpers"], - "clion-2022.3": ["@clion_2022_3//:python_helpers"], - "clion-2023.1": ["@clion_2023_1//:python_helpers"], - "clion-2023.2": ["@clion_2023_2//:python_helpers"], - "clion-2023.3": ["@clion_2023_3//:python_helpers"], - "clion-2024.1": ["@clion_2024_1//:python_helpers"], + "intellij-2024.3": ["@python_2024_3//:python_helpers"], + "intellij-ue-2024.3": ["@python_2024_3//:python_helpers"], "clion-2024.2": ["@python_2024_2//:python_helpers"], - "android-studio-2022.3": ["@python_2022_3//:python_helpers"], - "android-studio-2023.1": ["@python_2023_1//:python_helpers"], - "android-studio-2023.2": ["@python_2023_2//:python_helpers"], + "clion-2024.3": ["@python_2024_3//:python_helpers"], }), visibility = ["//visibility:private"], ) diff --git a/third_party/scala/BUILD b/third_party/scala/BUILD index b9026e4c3b1..f6965657e7d 100644 --- a/third_party/scala/BUILD +++ b/third_party/scala/BUILD @@ -8,20 +8,10 @@ java_library( name = "scala_internal", visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "intellij-ue-2024.3": ["@scala_2024_3//:scala"], - "intellij-2024.3": ["@scala_2024_3//:scala"], - "intellij-2022.3": ["@scala_2022_3//:scala"], - "intellij-ue-2022.3": ["@scala_2022_3//:scala"], - "intellij-2023.1": ["@scala_2023_1//:scala"], - "intellij-ue-2023.1": ["@scala_2023_1//:scala"], - "intellij-2023.2": ["@scala_2023_2//:scala"], - "intellij-ue-2023.2": ["@scala_2023_2//:scala"], - "intellij-2023.3": ["@scala_2023_3//:scala"], - "intellij-ue-2023.3": ["@scala_2023_3//:scala"], - "intellij-2024.1": ["@scala_2024_1//:scala"], - "intellij-ue-2024.1": ["@scala_2024_1//:scala"], "intellij-2024.2": ["@scala_2024_2//:scala"], "intellij-ue-2024.2": ["@scala_2024_2//:scala"], + "intellij-2024.3": ["@scala_2024_3//:scala"], + "intellij-ue-2024.3": ["@scala_2024_3//:scala"], "default": [], }), ) diff --git a/third_party/toml/BUILD b/third_party/toml/BUILD index e4878438374..5630f0a118c 100644 --- a/third_party/toml/BUILD +++ b/third_party/toml/BUILD @@ -4,8 +4,6 @@ java_library( name = "toml_internal", visibility = ["//visibility:private"], exports = select_for_plugin_api({ - "intellij-2024.1": ["@toml_2024_1//:toml"], - "intellij-ue-2024.1": ["@toml_2024_1//:toml"], "intellij-2024.2": ["@toml_2024_2//:toml"], "intellij-ue-2024.2": ["@toml_2024_2//:toml"], "intellij-2024.3": ["@toml_2024_3//:toml"], From 709f32a8addd0c36ce7149a8915c6cd471ad8d1d Mon Sep 17 00:00:00 2001 From: Daniel Brauner Date: Wed, 15 Jan 2025 21:58:14 +0100 Subject: [PATCH 2/4] Clean up sdkcompat - Inlined redundant compats - Removed unused compats --- .../ui/problems/BlazeProblemsViewPanel.java | 8 +- .../blaze/clwb/run/BlazeCidrLauncher.java | 6 +- .../blaze/golang/run/BlazeGoDebugRunner.java | 3 +- .../typescript/BlazeTypeScriptConfig.java | 43 +++++++---- .../BlazeTypeScriptConfigServiceImpl.java | 3 +- .../DelegatingTypeScriptConfigService.java | 4 +- sdkcompat/asdev/BUILD | 46 ------------ sdkcompat/v223/BUILD | 51 ------------- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../AsyncVfsEventsPostProcessorCompat.java | 33 --------- .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 10 --- .../javascript/JSModuleResolutionWrapper.java | 20 ----- .../javascript/JSModuleTargetWrapper.java | 19 ----- .../javascript/TypeScriptConfigAdapter.java | 43 ----------- ...TypeScriptConfigLibraryUpdaterAdapter.java | 28 ------- .../TypeScriptConfigServiceAdapter.java | 30 -------- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 24 ------ .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 17 ----- .../vcs/changes/FakeRevisionCompat.java | 12 --- .../changes/ui/ChangesListViewCreator.java | 13 ---- .../impl/VcsBaseContentProviderDelegator.java | 23 ------ sdkcompat/v231/BUILD | 54 -------------- .../JavaSafeDeleteProcessorCompat.java | 24 ------ .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 74 ------------------- .../AsyncVfsEventsPostProcessorCompat.java | 33 --------- .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 10 --- .../javascript/JSModuleResolutionWrapper.java | 20 ----- .../javascript/JSModuleTargetWrapper.java | 20 ----- .../javascript/TypeScriptConfigAdapter.java | 46 ------------ ...TypeScriptConfigLibraryUpdaterAdapter.java | 28 ------- .../TypeScriptConfigServiceAdapter.java | 11 --- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 24 ------ .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 18 ----- .../vcs/changes/FakeRevisionCompat.java | 12 --- .../changes/ui/ChangesListViewCreator.java | 13 ---- .../impl/VcsBaseContentProviderDelegator.java | 23 ------ sdkcompat/v232/BUILD | 51 ------------- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../AsyncVfsEventsPostProcessorCompat.java | 33 --------- .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 10 --- .../javascript/JSModuleResolutionWrapper.java | 20 ----- .../javascript/JSModuleTargetWrapper.java | 20 ----- .../javascript/TypeScriptConfigAdapter.java | 46 ------------ ...TypeScriptConfigLibraryUpdaterAdapter.java | 28 ------- .../TypeScriptConfigServiceAdapter.java | 11 --- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 24 ------ .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 18 ----- .../vcs/changes/FakeRevisionCompat.java | 12 --- .../changes/ui/ChangesListViewCreator.java | 13 ---- .../impl/VcsBaseContentProviderDelegator.java | 23 ------ sdkcompat/v233/BUILD | 51 ------------- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../AsyncVfsEventsPostProcessorCompat.java | 33 --------- .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 10 --- .../javascript/JSModuleResolutionWrapper.java | 20 ----- .../javascript/JSModuleTargetWrapper.java | 20 ----- .../javascript/TypeScriptConfigAdapter.java | 46 ------------ ...TypeScriptConfigLibraryUpdaterAdapter.java | 28 ------- .../TypeScriptConfigServiceAdapter.java | 11 --- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 24 ------ .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 18 ----- .../vcs/changes/FakeRevisionCompat.java | 12 --- .../changes/ui/ChangesListViewCreator.java | 18 ----- .../impl/VcsBaseContentProviderDelegator.java | 23 ------ sdkcompat/v241/BUILD | 64 ---------------- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../AsyncVfsEventsPostProcessorCompat.java | 33 --------- .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 26 ------- .../javascript/JSModuleResolutionWrapper.java | 35 --------- .../javascript/JSModuleTargetWrapper.java | 35 --------- .../javascript/TypeScriptConfigAdapter.java | 69 ----------------- ...TypeScriptConfigLibraryUpdaterAdapter.java | 28 ------- .../TypeScriptConfigServiceAdapter.java | 27 ------- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 40 ---------- .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 34 --------- .../vcs/changes/FakeRevisionCompat.java | 28 ------- .../changes/ui/ChangesListViewCreator.java | 29 -------- .../impl/VcsBaseContentProviderDelegator.java | 39 ---------- sdkcompat/v242/BUILD | 10 +-- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 26 ------- .../javascript/JSModuleResolutionWrapper.java | 35 --------- .../javascript/JSModuleTargetWrapper.java | 35 --------- .../javascript/TypeScriptConfigAdapter.java | 50 +------------ .../TypeScriptConfigServiceAdapter.java | 27 ------- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 40 ---------- .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 34 --------- .../vcs/changes/FakeRevisionCompat.java | 28 ------- .../changes/ui/ChangesListViewCreator.java | 29 -------- .../impl/VcsBaseContentProviderDelegator.java | 39 ---------- sdkcompat/v243/BUILD | 4 +- .../clion/CidrDebugProcessCreator.java | 13 ---- .../editor/markup/UIControllerCreator.java | 71 ------------------ .../general/NewErrorTreeViewPanelAdapter.java | 33 --------- .../google/idea/sdkcompat/go/GoSdkCompat.java | 26 ------- .../javascript/JSModuleResolutionWrapper.java | 35 --------- .../javascript/JSModuleTargetWrapper.java | 35 --------- .../javascript/TypeScriptConfigAdapter.java | 47 ------------ .../TypeScriptConfigServiceAdapter.java | 27 ------- .../TypeScriptConfigServiceImplCompat.java | 29 -------- .../JavaSafeDeleteProcessorCompat.java | 40 ---------- .../sdkcompat/ui/icons/IconManagerCompat.java | 33 --------- .../vcs/changes/ChangeListAdapterCompat.java | 34 --------- .../vcs/changes/FakeRevisionCompat.java | 28 ------- .../changes/ui/ChangesListViewCreator.java | 29 -------- .../impl/VcsBaseContentProviderDelegator.java | 39 ---------- 130 files changed, 46 insertions(+), 3789 deletions(-) delete mode 100644 sdkcompat/asdev/BUILD delete mode 100644 sdkcompat/v223/BUILD delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v223/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v231/BUILD delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/as/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v231/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v232/BUILD delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v232/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v233/BUILD delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v233/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v241/BUILD delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v241/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v242/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/go/GoSdkCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java delete mode 100644 sdkcompat/v243/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java diff --git a/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java b/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java index 3326d13a14a..54ad3e907a6 100644 --- a/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java +++ b/base/src/com/google/idea/blaze/base/ui/problems/BlazeProblemsViewPanel.java @@ -15,7 +15,6 @@ */ package com.google.idea.blaze.base.ui.problems; -import com.google.idea.sdkcompat.general.NewErrorTreeViewPanelAdapter; import com.intellij.icons.AllIcons; import com.intellij.ide.DataManager; import com.intellij.ide.IdeBundle; @@ -24,6 +23,7 @@ import com.intellij.ide.actions.PreviousOccurenceToolbarAction; import com.intellij.ide.errorTreeView.ErrorTreeElement; import com.intellij.ide.errorTreeView.NavigatableMessageElement; +import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; import com.intellij.ide.errorTreeView.impl.ErrorTreeViewConfiguration; import com.intellij.openapi.actionSystem.ActionManager; import com.intellij.openapi.actionSystem.ActionPlaces; @@ -54,7 +54,7 @@ import javax.swing.JComponent; /** A custom error tree view panel for Blaze invocation errors. */ -class BlazeProblemsViewPanel extends NewErrorTreeViewPanelAdapter { +class BlazeProblemsViewPanel extends NewErrorTreeViewPanel { private static final DataKey BLAZE_CONSOLE_NAVIGATABLE_DATA_KEY = DataKey.create("blaze.console.navigatable"); @@ -169,6 +169,10 @@ private ActionCallback getReady(DataContext context) { : ActionCallback.DONE; } + public Project getProject(){ + return project; + } + private class AutoscrollToConsoleAction extends ToggleAction implements DumbAware { public AutoscrollToConsoleAction() { super("Autoscroll to console", "Autoscroll to console", AllIcons.Debugger.Console); diff --git a/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrLauncher.java b/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrLauncher.java index c4400d20861..733baac7428 100644 --- a/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrLauncher.java +++ b/clwb/src/com/google/idea/blaze/clwb/run/BlazeCidrLauncher.java @@ -46,7 +46,6 @@ import com.google.idea.blaze.base.settings.BuildSystemName; import com.google.idea.blaze.clwb.ToolchainUtils; import com.google.idea.blaze.cpp.CppBlazeRules; -import com.google.idea.sdkcompat.clion.CidrDebugProcessCreator; import com.intellij.execution.ExecutionException; import com.intellij.execution.configuration.EnvironmentVariablesData; import com.intellij.execution.configurations.CommandLineState; @@ -64,6 +63,7 @@ import com.intellij.openapi.ui.Messages; import com.intellij.xdebugger.XDebugSession; import com.jetbrains.cidr.execution.CidrConsoleBuilder; +import com.jetbrains.cidr.execution.CidrCoroutineHelper; import com.jetbrains.cidr.execution.CidrLauncher; import com.jetbrains.cidr.execution.TrivialInstaller; import com.jetbrains.cidr.execution.TrivialRunParameters; @@ -270,7 +270,7 @@ public CidrDebugProcess createDebugProcess(CommandLineState state, XDebugSession state.setConsoleBuilder(createConsoleBuilder(null)); state.addConsoleFilters(getConsoleFilters().toArray(new Filter[0])); - return CidrDebugProcessCreator.create(() -> new CidrLocalDebugProcess(parameters, session, state.getConsoleBuilder())); + return CidrCoroutineHelper.runOnEDT(() -> new CidrLocalDebugProcess(parameters, session, state.getConsoleBuilder())); } List extraDebugFlags = BlazeGDBServerProvider.getFlagsForDebugging(handlerState); @@ -293,7 +293,7 @@ public CidrDebugProcess createDebugProcess(CommandLineState state, XDebugSession BlazeCLionGDBDriverConfiguration debuggerDriverConfiguration = new BlazeCLionGDBDriverConfiguration(project); - return CidrDebugProcessCreator.create(() -> new BlazeCidrRemoteDebugProcess( + return CidrCoroutineHelper.runOnEDT(() -> new BlazeCidrRemoteDebugProcess( targetProcess, debuggerDriverConfiguration, parameters, session, state.getConsoleBuilder())); } diff --git a/golang/src/com/google/idea/blaze/golang/run/BlazeGoDebugRunner.java b/golang/src/com/google/idea/blaze/golang/run/BlazeGoDebugRunner.java index a8aef2d58db..a525ca2e52d 100644 --- a/golang/src/com/google/idea/blaze/golang/run/BlazeGoDebugRunner.java +++ b/golang/src/com/google/idea/blaze/golang/run/BlazeGoDebugRunner.java @@ -28,7 +28,6 @@ import com.google.idea.blaze.base.run.BlazeCommandRunConfiguration; import com.google.idea.blaze.base.run.state.BlazeCommandRunConfigurationCommonState; import com.google.idea.blaze.golang.run.BlazeGoRunConfigurationRunner.BlazeGoDummyDebugProfileState; -import com.google.idea.sdkcompat.go.GoSdkCompat; import com.intellij.execution.ExecutionException; import com.intellij.execution.ExecutionResult; import com.intellij.execution.configurations.RunProfile; @@ -86,7 +85,7 @@ protected RunContentDescriptor doExecute( EventLoggingService.getInstance().logEvent(getClass(), "debugging-go"); GoApplicationRunningState goState = blazeState.toNativeState(environment); ProgressManager.getInstance().runProcessWithProgressSynchronously( - () -> ReadAction.run(() -> GoSdkCompat.prepareState(goState)), + () -> ReadAction.run(goState::prepareStateInBGT), "Preparing Go Application Running State", false, environment.getProject()); diff --git a/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfig.java b/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfig.java index e0ce32ab6ab..772d68530a0 100644 --- a/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfig.java +++ b/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfig.java @@ -29,9 +29,12 @@ import com.google.idea.blaze.base.model.primitives.WorkspaceRoot; import com.google.idea.blaze.base.settings.Blaze; import com.google.idea.blaze.base.settings.BuildSystemName; -import com.google.idea.sdkcompat.javascript.JSModuleResolutionWrapper; -import com.google.idea.sdkcompat.javascript.JSModuleTargetWrapper; import com.google.idea.sdkcompat.javascript.TypeScriptConfigAdapter; +import com.intellij.lang.javascript.config.JSFileImports; +import com.intellij.lang.javascript.config.JSFileImportsImpl; +import com.intellij.lang.javascript.config.JSModuleResolution; +import com.intellij.lang.javascript.config.JSModuleTarget; +import com.intellij.lang.javascript.frameworks.modules.JSModulePathMappings; import com.intellij.lang.javascript.frameworks.modules.JSModulePathSubstitution; import com.intellij.lang.javascript.library.JSLibraryUtil; import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; @@ -97,8 +100,8 @@ class BlazeTypeScriptConfig extends TypeScriptConfigAdapter { private final NullableLazyValue baseUrlFile; private boolean inlineSourceMap = true; private String jsxFactory = "React.createElement"; - private JSModuleTargetWrapper module = JSModuleTargetWrapper.COMMON_JS; - private JSModuleResolutionWrapper moduleResolution = JSModuleResolutionWrapper.NODE; + private JSModuleTarget module = JSModuleTarget.COMMON_JS; + private JSModuleResolution moduleResolution = JSModuleResolution.NODE; private boolean noImplicitAny = true; private boolean noImplicitThis = true; private boolean noLib = true; @@ -114,6 +117,8 @@ class BlazeTypeScriptConfig extends TypeScriptConfigAdapter { // end compilerOptions private final List filesStrings = new ArrayList<>(); private final NotNullLazyValue> files; + private final NotNullLazyValue importStructure; + @Nullable static TypeScriptConfig getInstance(Project project, Label label, File tsconfig) { @@ -242,7 +247,7 @@ private BlazeTypeScriptConfig( this.importResolver = NotNullLazyValue.createValue( () -> TypeScriptImportsResolverProvider.getResolver(project, this)); - initImportsStructure(project); + importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); try { parseJson( @@ -305,26 +310,26 @@ private void parseCompilerOptions(JsonObject json) { case "module": switch (Ascii.toLowerCase(value.getAsString())) { case "commonjs": - this.module = JSModuleTargetWrapper.COMMON_JS; + this.module = JSModuleTarget.COMMON_JS; break; case "other": - this.module = JSModuleTargetWrapper.OTHER; + this.module = JSModuleTarget.OTHER; break; default: - this.module = JSModuleTargetWrapper.UNKNOWN; + this.module = JSModuleTarget.UNKNOWN; break; } break; case "moduleResolution": switch (Ascii.toLowerCase(value.getAsString())) { case "node": - this.moduleResolution = JSModuleResolutionWrapper.NODE; + this.moduleResolution = JSModuleResolution.NODE; break; case "classic": - this.moduleResolution = JSModuleResolutionWrapper.CLASSIC; + this.moduleResolution = JSModuleResolution.CLASSIC; break; default: - this.moduleResolution = JSModuleResolutionWrapper.UNKNOWN; + this.moduleResolution = JSModuleResolution.UNKNOWN; break; } break; @@ -467,6 +472,16 @@ private ImmutableList resolveFilesList() { .collect(ImmutableList.toImmutableList()); } + @Override + public JSFileImports getConfigImportResolveStructure() { + return importStructure.getValue(); + } + + @Override + public @NotNull JSModulePathMappings getPathMappings() { + return JSModulePathMappings.build(getPaths()); + } + @Override public boolean isDirectoryBased() { return false; @@ -535,12 +550,12 @@ public Collection getTypeRoots() { } @Override - public @NotNull JSModuleResolutionWrapper getAdapterResolution() { + public @NotNull JSModuleResolution getResolution() { return moduleResolution; } @Override - public JSModuleResolutionWrapper getAdapterEffectiveResolution() { + public JSModuleResolution getEffectiveResolution() { return moduleResolution; } @@ -550,7 +565,7 @@ public Collection getTypes() { } @Override - public JSModuleTargetWrapper getAdapterModule() { + public JSModuleTarget getModule() { return module; } diff --git a/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfigServiceImpl.java b/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfigServiceImpl.java index a9c564e958f..0659f459e8b 100644 --- a/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfigServiceImpl.java +++ b/javascript/src/com/google/idea/blaze/typescript/BlazeTypeScriptConfigServiceImpl.java @@ -24,7 +24,6 @@ import com.google.idea.blaze.base.model.primitives.Label; import com.google.idea.blaze.base.sync.BlazeSyncModificationTracker; import com.google.idea.common.experiments.BoolExperiment; -import com.google.idea.sdkcompat.javascript.TypeScriptConfigServiceImplCompat; import com.intellij.lang.typescript.compiler.TypeScriptCompilerService; import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; @@ -224,7 +223,7 @@ public Set getIncludedFiles(VirtualFile file) { private ImmutableList getNearestParentTsConfigs( @Nullable VirtualFile scopeFile, ImmutableMap configs) { - return TypeScriptConfigServiceImplCompat.getNearestParentTsConfigs(project, scopeFile, false).stream() + return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(project, scopeFile, false).stream() .filter(configs::containsKey) .collect(toImmutableList()); } diff --git a/javascript/src/com/google/idea/blaze/typescript/DelegatingTypeScriptConfigService.java b/javascript/src/com/google/idea/blaze/typescript/DelegatingTypeScriptConfigService.java index 8bde8534f28..3544ac4ce34 100644 --- a/javascript/src/com/google/idea/blaze/typescript/DelegatingTypeScriptConfigService.java +++ b/javascript/src/com/google/idea/blaze/typescript/DelegatingTypeScriptConfigService.java @@ -20,7 +20,6 @@ import com.google.idea.blaze.base.model.primitives.Label; import com.google.idea.blaze.base.settings.Blaze; import com.google.idea.common.experiments.BoolExperiment; -import com.google.idea.sdkcompat.javascript.TypeScriptConfigServiceAdapter; import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; @@ -38,10 +37,9 @@ * Switches between {@link BlazeTypeScriptConfigServiceImpl} if the project is an applicable blaze * project, or {@link TypeScriptConfigServiceImpl} if it isn't. */ -class DelegatingTypeScriptConfigService extends TypeScriptConfigServiceAdapter { +class DelegatingTypeScriptConfigService implements TypeScriptConfigService { private final TypeScriptConfigService impl; - @Override public TypeScriptConfigService getImpl() { return impl; } diff --git a/sdkcompat/asdev/BUILD b/sdkcompat/asdev/BUILD deleted file mode 100644 index 7b43be13399..00000000000 --- a/sdkcompat/asdev/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Description: Indirections for SDK changes to the underlying platform library. - -load("@rules_java//java:defs.bzl", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "asdev", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/logging/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/scala", - ], -) diff --git a/sdkcompat/v223/BUILD b/sdkcompat/v223/BUILD deleted file mode 100644 index 2951fbfd560..00000000000 --- a/sdkcompat/v223/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Description: Indirections for SDK changes to the underlying platform library. - -load("@rules_java//java:defs.bzl", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "v223", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio - "com/google/idea/sdkcompat/javascript/**", #api223 - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/javascript/**", - "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/go", #api231 - "//third_party/scala", - "//third_party/javascript" - ], -) diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v223/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index de9dcc02ec6..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return creator.compute(); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v223/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index f0cb42fec33..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean enableToolbar() { - return true; - } - - @Override - public boolean canClosePopup() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java deleted file mode 100644 index 35f9db6c9eb..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.project.Project; -import com.intellij.vfs.AsyncVfsEventsListener; -import com.intellij.vfs.AsyncVfsEventsPostProcessor; - -// #api242 -public class AsyncVfsEventsPostProcessorCompat { - private AsyncVfsEventsPostProcessorCompat(){ - - } - - public static void addListener(AsyncVfsEventsListener listener, Disposable disposable, Project project) { - AsyncVfsEventsPostProcessor.getInstance().addListener(listener, disposable); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v223/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 6cc0dda361f..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return myProject; - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index bffe50e3304..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.idea.sdkcompat.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index 394e1f7f3c5..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig.ModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(ModuleResolution.NODE), - NODENEXT(ModuleResolution.NODENEXT), - CLASSIC(ModuleResolution.CLASSIC), - UNKNOWN(ModuleResolution.UNKNOWN); - - private final ModuleResolution value; - - JSModuleResolutionWrapper(ModuleResolution value){ - this.value = value; - } - - public ModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index f1d5390536a..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig.ModuleTarget; -public enum JSModuleTargetWrapper { - COMMON_JS(ModuleTarget.COMMON_JS), - OTHER(ModuleTarget.OTHER), - NODENEXT(ModuleTarget.NODENEXT), - UNKNOWN(ModuleTarget.UNKNOWN); - - private final ModuleTarget value; - - public ModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(ModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java deleted file mode 100644 index 611cabedea2..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig.ModuleTarget; -import com.intellij.lang.typescript.tsconfig.TypeScriptFileImports; -import com.intellij.lang.typescript.tsconfig.TypeScriptFileImportsImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import org.jetbrains.annotations.NotNull; - -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - @Override - public @NotNull ModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public ModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull ModuleTarget getModule() { - return getAdapterModule().value(); - } - - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new TypeScriptFileImportsImpl(project, this)); - } - - @Override - public TypeScriptFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java deleted file mode 100644 index ef7321e3d31..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigLibraryUpdater; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -// #api242 -public class TypeScriptConfigLibraryUpdaterAdapter extends TypeScriptConfigLibraryUpdater { - public TypeScriptConfigLibraryUpdaterAdapter(@NotNull Project project) { - super(project); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index ad8f8f227b1..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigsChangedListener; -import com.intellij.openapi.util.ModificationTracker; -import com.intellij.openapi.vfs.VirtualFile; -import org.jetbrains.annotations.Nullable; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); - - @Override // deprecated, removed in 2023.1 - public List getConfigFiles() { - return getImpl().getConfigFiles(); - } - - @Override // deprecated, removed in 2023.1 - public void addChangeListener(TypeScriptConfigsChangedListener listener) { - getImpl().addChangeListener(listener); - } - - @Override // Removed in 2023.1 - public ModificationTracker getConfigTracker(@Nullable VirtualFile file) { - return getImpl().getConfigTracker(file); - } - -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 36dae7ea54d..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(scopeFile, false); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index ac4dba76f96..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.idea.sdkcompat.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 2d66d57392e..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.CoreIconManager; -import com.intellij.ui.IconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.deactivate(); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index ce1fd9591f6..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved(Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 10659c43dcd..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(file); - } -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index 758b75f5fcf..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes); - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v223/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index f8f7ea8d351..00000000000 --- a/sdkcompat/v223/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.idea.sdkcompat.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vcs.impl.VcsFileStatusProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final VcsBaseContentProvider delegate; - - public VcsBaseContentProviderDelegator(Project project) { - this.delegate = project.getComponent(VcsFileStatusProvider.class); - } - - public boolean isSupported(VirtualFile file) { - return delegate.isSupported(file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return delegate.getBaseRevision(file); - } -} diff --git a/sdkcompat/v231/BUILD b/sdkcompat/v231/BUILD deleted file mode 100644 index 4d21cf2e838..00000000000 --- a/sdkcompat/v231/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Description: Indirections for SDK changes to the underlying platform library. - -load("@rules_java//java:defs.bzl", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "v231", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/as/refactoring/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/vcs/**", - ]), - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio - "com/google/idea/sdkcompat/javascript/**", #api223 - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/refactoring/**", - ]), - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/javascript/**", #api223 - "com/google/idea/sdkcompat/refactoring/**", - "com/google/idea/sdkcompat/go/**", #api231 - ]), - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/go", #api231 - "//third_party/scala", - "//third_party/javascript" #api223 - ], -) diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/as/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/as/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 058388238be..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/as/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.idea.sdkcompat.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for BuildFileSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v231/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index de9dcc02ec6..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return creator.compute(); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v231/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 12d260ffdb3..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - public boolean isToolbarEnabled() { - return true; - } - - public boolean enableToolbar() { - return true; - } - - @Override - public boolean canClosePopup() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java deleted file mode 100644 index 35f9db6c9eb..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.project.Project; -import com.intellij.vfs.AsyncVfsEventsListener; -import com.intellij.vfs.AsyncVfsEventsPostProcessor; - -// #api242 -public class AsyncVfsEventsPostProcessorCompat { - private AsyncVfsEventsPostProcessorCompat(){ - - } - - public static void addListener(AsyncVfsEventsListener listener, Disposable disposable, Project project) { - AsyncVfsEventsPostProcessor.getInstance().addListener(listener, disposable); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v231/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 6cc0dda361f..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return myProject; - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index bffe50e3304..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.idea.sdkcompat.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index ca4e755bd82..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 93aec3f2049..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java deleted file mode 100644 index 2e4885390c2..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; - -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java deleted file mode 100644 index ef7321e3d31..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigLibraryUpdater; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -// #api242 -public class TypeScriptConfigLibraryUpdaterAdapter extends TypeScriptConfigLibraryUpdater { - public TypeScriptConfigLibraryUpdaterAdapter(@NotNull Project project) { - super(project); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index ff2beb6aa15..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 36dae7ea54d..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(scopeFile, false); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 058388238be..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.idea.sdkcompat.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for BuildFileSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 2d66d57392e..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.CoreIconManager; -import com.intellij.ui.IconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.deactivate(); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index f7d1a38bf1f..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 7fb83e0d77b..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index 0da3611db6b..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v231/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index b4cae0de078..00000000000 --- a/sdkcompat/v231/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.idea.sdkcompat.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} diff --git a/sdkcompat/v232/BUILD b/sdkcompat/v232/BUILD deleted file mode 100644 index b702eb228ed..00000000000 --- a/sdkcompat/v232/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Description: Indirections for SDK changes to the underlying platform library. - -load("@rules_java//java:defs.bzl", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "v232", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio - "com/google/idea/sdkcompat/javascript/**", #api223 - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/javascript/**", #api223 - "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/go", #api231 - "//third_party/scala", - "//third_party/javascript" #api223 - ], -) diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v232/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index de9dcc02ec6..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return creator.compute(); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v232/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 6607c1a0910..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean canClosePopup() { - return true; - } - - @Override - public boolean isToolbarEnabled() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java deleted file mode 100644 index 35f9db6c9eb..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.project.Project; -import com.intellij.vfs.AsyncVfsEventsListener; -import com.intellij.vfs.AsyncVfsEventsPostProcessor; - -// #api242 -public class AsyncVfsEventsPostProcessorCompat { - private AsyncVfsEventsPostProcessorCompat(){ - - } - - public static void addListener(AsyncVfsEventsListener listener, Disposable disposable, Project project) { - AsyncVfsEventsPostProcessor.getInstance().addListener(listener, disposable); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v232/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 6cc0dda361f..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return myProject; - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index 3839f8d4c09..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.idea.sdkcompat.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - state.prepareStateInBGT(); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index ca4e755bd82..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 93aec3f2049..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java deleted file mode 100644 index 2e4885390c2..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; - -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java deleted file mode 100644 index ef7321e3d31..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigLibraryUpdater; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -// #api242 -public class TypeScriptConfigLibraryUpdaterAdapter extends TypeScriptConfigLibraryUpdater { - public TypeScriptConfigLibraryUpdaterAdapter(@NotNull Project project) { - super(project); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index ff2beb6aa15..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 36dae7ea54d..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(scopeFile, false); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 8587692f1c0..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.idea.sdkcompat.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 1d8afe8e0c4..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.IconManager; -import com.intellij.ui.icons.CoreIconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.Companion.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.Companion.deactivate(); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index f7d1a38bf1f..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 7fb83e0d77b..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index 0da3611db6b..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v232/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index b4cae0de078..00000000000 --- a/sdkcompat/v232/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.idea.sdkcompat.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} diff --git a/sdkcompat/v233/BUILD b/sdkcompat/v233/BUILD deleted file mode 100644 index e113ba8e082..00000000000 --- a/sdkcompat/v233/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -# Description: Indirections for SDK changes to the underlying platform library. - -load("@rules_java//java:defs.bzl", "java_library") -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "v233", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio - "com/google/idea/sdkcompat/javascript/**", #api223 - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/javascript/**", #api223 - "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/go", #api231 - "//third_party/javascript", #api223 - "//third_party/scala", - ], -) diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v233/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index de9dcc02ec6..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return creator.compute(); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v233/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 6607c1a0910..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean canClosePopup() { - return true; - } - - @Override - public boolean isToolbarEnabled() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java deleted file mode 100644 index 35f9db6c9eb..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.project.Project; -import com.intellij.vfs.AsyncVfsEventsListener; -import com.intellij.vfs.AsyncVfsEventsPostProcessor; - -// #api242 -public class AsyncVfsEventsPostProcessorCompat { - private AsyncVfsEventsPostProcessorCompat(){ - - } - - public static void addListener(AsyncVfsEventsListener listener, Disposable disposable, Project project) { - AsyncVfsEventsPostProcessor.getInstance().addListener(listener, disposable); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v233/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 6cc0dda361f..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return myProject; - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index 3839f8d4c09..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.idea.sdkcompat.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - state.prepareStateInBGT(); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index ca4e755bd82..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 93aec3f2049..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java deleted file mode 100644 index 2e4885390c2..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; - -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java deleted file mode 100644 index ef7321e3d31..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigLibraryUpdater; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -// #api242 -public class TypeScriptConfigLibraryUpdaterAdapter extends TypeScriptConfigLibraryUpdater { - public TypeScriptConfigLibraryUpdaterAdapter(@NotNull Project project) { - super(project); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index ff2beb6aa15..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.idea.sdkcompat.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 36dae7ea54d..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(scopeFile, false); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 8587692f1c0..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.google.idea.sdkcompat.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 1d8afe8e0c4..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.IconManager; -import com.intellij.ui.icons.CoreIconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.Companion.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.Companion.deactivate(); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index f7d1a38bf1f..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 7fb83e0d77b..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index 8aec8bdeb63..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.google.idea.sdkcompat.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; -import javax.swing.tree.DefaultTreeModel; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - public static void update(ChangesListView changesListView, DefaultTreeModel treeModel) { - changesListView.setModel(treeModel); - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v233/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index b4cae0de078..00000000000 --- a/sdkcompat/v233/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.idea.sdkcompat.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} diff --git a/sdkcompat/v241/BUILD b/sdkcompat/v241/BUILD deleted file mode 100644 index 1da7bfd7475..00000000000 --- a/sdkcompat/v241/BUILD +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2024 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. - -# Description: Indirections for SDK changes to the underlying platform library. - -load("//intellij_platform_sdk:build_defs.bzl", "select_for_ide") - -licenses(["notice"]) - -java_library( - name = "v241", - srcs = glob([ - "com/google/idea/sdkcompat/editor/**", - "com/google/idea/sdkcompat/general/**", - "com/google/idea/sdkcompat/fig/**", - "com/google/idea/sdkcompat/platform/**", - "com/google/idea/sdkcompat/psi/**", - "com/google/idea/sdkcompat/python/**", - "com/google/idea/sdkcompat/ui/icons/**", - ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - clion = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio - "com/google/idea/sdkcompat/javascript/**", #api223 - ]), - intellij = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - intellij_ue = glob([ - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/scala/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/javascript/**", #api223 - "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], - ), - visibility = ["//sdkcompat:__pkg__"], - deps = [ - "//intellij_platform_sdk:jsr305", # unuseddeps: keep - "//intellij_platform_sdk:plugin_api", - "//third_party/go", #api231 - "//third_party/javascript", #api223 - "//third_party/scala", - ], -) diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v241/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index de9dcc02ec6..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return creator.compute(); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v241/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 6607c1a0910..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean canClosePopup() { - return true; - } - - @Override - public boolean isToolbarEnabled() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java deleted file mode 100644 index 35f9db6c9eb..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/general/AsyncVfsEventsPostProcessorCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.project.Project; -import com.intellij.vfs.AsyncVfsEventsListener; -import com.intellij.vfs.AsyncVfsEventsPostProcessor; - -// #api242 -public class AsyncVfsEventsPostProcessorCompat { - private AsyncVfsEventsPostProcessorCompat(){ - - } - - public static void addListener(AsyncVfsEventsListener listener, Disposable disposable, Project project) { - AsyncVfsEventsPostProcessor.getInstance().addListener(listener, disposable); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v241/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 2eb9ff96253..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return project; - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index c075ad5979e..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2024 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.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - state.prepareStateInBGT(); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index e7ea6377ed0..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 0a8873667e2..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java deleted file mode 100644 index ab07be7bb7f..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.frameworks.modules.JSModulePathMappings; -import com.intellij.lang.javascript.frameworks.modules.JSModulePathSubstitution; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; -import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; - -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } - - @Override - public @NotNull JSModulePathMappings getPathMappings() { - return JSModulePathMappings.build(getPaths()); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java deleted file mode 100644 index ef7321e3d31..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigLibraryUpdaterAdapter.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigLibraryUpdater; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -// #api242 -public class TypeScriptConfigLibraryUpdaterAdapter extends TypeScriptConfigLibraryUpdater { - public TypeScriptConfigLibraryUpdaterAdapter(@NotNull Project project) { - super(project); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index 8ec2e70f5d5..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 36dae7ea54d..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(scopeFile, false); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 2e7b9a8ab82..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2024 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.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 1d8afe8e0c4..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.IconManager; -import com.intellij.ui.icons.CoreIconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.Companion.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.Companion.deactivate(); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index 9a48be5234c..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 488b0d071af..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index a96e661b15b..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v241/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index 4d97a49debf..00000000000 --- a/sdkcompat/v241/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2024 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.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} diff --git a/sdkcompat/v242/BUILD b/sdkcompat/v242/BUILD index 3b6e14ff530..271005e4119 100644 --- a/sdkcompat/v242/BUILD +++ b/sdkcompat/v242/BUILD @@ -36,12 +36,6 @@ java_library( "com/google/idea/sdkcompat/python/**", "com/google/idea/sdkcompat/ui/icons/**", ]) + select_for_ide( - android_studio = glob([ - "com/google/idea/sdkcompat/cpp/**", - "com/google/idea/sdkcompat/java/**", - "com/google/idea/sdkcompat/kotlin/**", - "com/google/idea/sdkcompat/vcs/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], clion = glob([ "com/google/idea/sdkcompat/cpp/**", "com/google/idea/sdkcompat/clion/**", # For classes incompatible with Android Studio @@ -51,14 +45,14 @@ java_library( "com/google/idea/sdkcompat/java/**", "com/google/idea/sdkcompat/scala/**", "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], + ]), intellij_ue = glob([ "com/google/idea/sdkcompat/java/**", "com/google/idea/sdkcompat/scala/**", "com/google/idea/sdkcompat/kotlin/**", "com/google/idea/sdkcompat/javascript/**", #api223 "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], + ]), ), visibility = ["//sdkcompat:__pkg__"], ) diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v242/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index a8490bce43a..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.CidrCoroutineHelper; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return CidrCoroutineHelper.runOnEDT(creator); - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v242/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 6607c1a0910..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean canClosePopup() { - return true; - } - - @Override - public boolean isToolbarEnabled() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v242/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 2eb9ff96253..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return project; - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index c075ad5979e..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2024 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.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - state.prepareStateInBGT(); - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index e7ea6377ed0..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 0a8873667e2..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java index ab07be7bb7f..f478eec63d7 100644 --- a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java @@ -16,54 +16,6 @@ package com.google.idea.sdkcompat.javascript; -import com.intellij.lang.javascript.frameworks.modules.JSModulePathMappings; -import com.intellij.lang.javascript.frameworks.modules.JSModulePathSubstitution; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; -public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } - - @Override - public @NotNull JSModulePathMappings getPathMappings() { - return JSModulePathMappings.build(getPaths()); - } -} +public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { } diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index 8ec2e70f5d5..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 05401fa08e8..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(project, scopeFile, false); - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 2e7b9a8ab82..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2024 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.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 1d8afe8e0c4..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.IconManager; -import com.intellij.ui.icons.CoreIconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.Companion.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.Companion.deactivate(); - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index 9a48be5234c..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 488b0d071af..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index a96e661b15b..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v242/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index 4d97a49debf..00000000000 --- a/sdkcompat/v242/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2024 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.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} diff --git a/sdkcompat/v243/BUILD b/sdkcompat/v243/BUILD index 4d914aab5d9..a0b0d239c54 100644 --- a/sdkcompat/v243/BUILD +++ b/sdkcompat/v243/BUILD @@ -45,14 +45,14 @@ java_library( "com/google/idea/sdkcompat/java/**", "com/google/idea/sdkcompat/scala/**", "com/google/idea/sdkcompat/kotlin/**", - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], + ]), intellij_ue = glob([ "com/google/idea/sdkcompat/java/**", "com/google/idea/sdkcompat/scala/**", "com/google/idea/sdkcompat/kotlin/**", "com/google/idea/sdkcompat/javascript/**", #api223 "com/google/idea/sdkcompat/go/**", #api231 - ]) + ["com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java"], + ]), ), visibility = ["//sdkcompat:__pkg__"], ) diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java b/sdkcompat/v243/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java deleted file mode 100644 index a8490bce43a..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/clion/CidrDebugProcessCreator.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.google.idea.sdkcompat.clion; - -import com.intellij.execution.ExecutionException; -import com.intellij.openapi.util.ThrowableComputable; -import com.jetbrains.cidr.execution.CidrCoroutineHelper; -import com.jetbrains.cidr.execution.debugger.CidrDebugProcess; - -// #api241 -public class CidrDebugProcessCreator { - public static CidrDebugProcess create(ThrowableComputable creator) throws ExecutionException { - return CidrCoroutineHelper.runOnEDT(creator); - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java b/sdkcompat/v243/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java deleted file mode 100644 index 6607c1a0910..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/editor/markup/UIControllerCreator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2023 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.editor.markup; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.editor.markup.InspectionsLevel; -import com.intellij.openapi.editor.markup.LanguageHighlightLevel; -import com.intellij.openapi.editor.markup.UIController; -import com.intellij.util.ui.GridBag; -import java.awt.Container; -import java.util.ArrayList; -import java.util.List; - -/** A compat class help to create UIController instance for different sdk */ -public final class UIControllerCreator { - public static UIController create() { - return new UIController() { - @Override - public void toggleProblemsView() {} - - @Override - public void setHighLightLevel(LanguageHighlightLevel level) {} - - @Override - public void onClosePopup() {} - - @Override - public List getHighlightLevels() { - return new ArrayList<>(); - } - - @Override - public List getAvailableLevels() { - return new ArrayList<>(); - } - - @Override - public List getActions() { - return new ArrayList<>(); - } - - @Override - public void fillHectorPanels(Container container, GridBag bag) {} - - @Override - public boolean canClosePopup() { - return true; - } - - @Override - public boolean isToolbarEnabled() { - return true; - } - }; - } - - private UIControllerCreator() {} -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java b/sdkcompat/v243/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java deleted file mode 100644 index 2eb9ff96253..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/general/NewErrorTreeViewPanelAdapter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2024 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.general; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public abstract class NewErrorTreeViewPanelAdapter extends NewErrorTreeViewPanel { - public NewErrorTreeViewPanelAdapter(@NotNull Project project, @Nullable String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) { - super(project, helpId, createExitAction, createToolbar, rerunAction); - } - - /** #api233 */ - public Project getProject(){ - return project; - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/go/GoSdkCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/go/GoSdkCompat.java deleted file mode 100644 index c075ad5979e..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/go/GoSdkCompat.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2024 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.go; - -import com.goide.execution.application.GoApplicationRunningState; - -public class GoSdkCompat { - /* api231 */ - public static void prepareState(GoApplicationRunningState state) { - state.prepareStateInBGT(); - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java deleted file mode 100644 index e7ea6377ed0..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleResolutionWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleResolution; - -public enum JSModuleResolutionWrapper { - NODE(JSModuleResolution.NODE), - NODENEXT(JSModuleResolution.NODENEXT), - CLASSIC(JSModuleResolution.CLASSIC), - UNKNOWN(JSModuleResolution.UNKNOWN); - - private final JSModuleResolution value; - - JSModuleResolutionWrapper(JSModuleResolution value){ - this.value = value; - } - - public JSModuleResolution value() { - return value; - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java deleted file mode 100644 index 0a8873667e2..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/JSModuleTargetWrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.javascript.config.JSModuleTarget; - -public enum JSModuleTargetWrapper { - COMMON_JS(JSModuleTarget.COMMON_JS), - OTHER(JSModuleTarget.OTHER), - NODENEXT(JSModuleTarget.NODENEXT), - UNKNOWN(JSModuleTarget.UNKNOWN); - - private final JSModuleTarget value; - - public JSModuleTarget value() { - return value; - } - - JSModuleTargetWrapper(JSModuleTarget value) { - this.value = value; - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java index 4524f37f821..0f78da343b9 100644 --- a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java +++ b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigAdapter.java @@ -16,58 +16,11 @@ package com.google.idea.sdkcompat.javascript; -import com.intellij.lang.javascript.frameworks.modules.JSModulePathMappings; -import com.intellij.lang.javascript.frameworks.modules.JSModulePathSubstitution; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.NotNullLazyValue; -import com.intellij.lang.javascript.config.JSFileImports; -import com.intellij.lang.javascript.config.JSFileImportsImpl; -import com.intellij.lang.javascript.config.JSModuleResolution; -import com.intellij.lang.javascript.config.JSModuleTarget; import com.intellij.lang.typescript.tsconfig.TypeScriptConfig; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public abstract class TypeScriptConfigAdapter implements TypeScriptConfig { - public abstract JSModuleTargetWrapper getAdapterModule(); - - public abstract JSModuleResolutionWrapper getAdapterResolution(); - - public abstract JSModuleResolutionWrapper getAdapterEffectiveResolution(); - - - @Override - public @NotNull JSModuleResolution getResolution() { - return getAdapterResolution().value(); - } - - @Override - public JSModuleResolution getEffectiveResolution() { - return getAdapterEffectiveResolution().value(); - } - - @Override - public @NotNull JSModuleTarget getModule() { - return getAdapterModule().value(); - } - NotNullLazyValue importStructure; - - //todo do it in constructor - public void initImportsStructure(Project project) { - this.importStructure = NotNullLazyValue.createValue(() -> new JSFileImportsImpl(project, this)); - } - - @Override - public JSFileImports getConfigImportResolveStructure() { - return importStructure.getValue(); - } - - @Override - public @NotNull JSModulePathMappings getPathMappings() { - return JSModulePathMappings.build(getPaths()); - } - @Override public @Nullable String getDeclarationDir() { return null; diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java deleted file mode 100644 index 8ec2e70f5d5..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceAdapter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigService; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.List; - -public abstract class TypeScriptConfigServiceAdapter implements TypeScriptConfigService { - - public abstract TypeScriptConfigService getImpl(); -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java deleted file mode 100644 index 05401fa08e8..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/javascript/TypeScriptConfigServiceImplCompat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.javascript; - -import com.intellij.lang.typescript.tsconfig.TypeScriptConfigServiceImpl; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -import java.util.Collection; - -// #api241 inline -public class TypeScriptConfigServiceImplCompat { - public static Collection getNearestParentTsConfigs(Project project, VirtualFile scopeFile, Boolean b) { - return TypeScriptConfigServiceImpl.getNearestParentTsConfigs(project, scopeFile, false); - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java deleted file mode 100644 index 2e7b9a8ab82..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/refactoring/safedelete/JavaSafeDeleteProcessorCompat.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2024 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.refactoring.safedelete; - -import com.intellij.psi.PsiElement; -import com.intellij.refactoring.safeDelete.JavaSafeDeleteProcessor; -import com.intellij.refactoring.safeDelete.NonCodeUsageSearchInfo; -import com.intellij.usageView.UsageInfo; -import java.util.List; - -/** Compat class for JavaSafeDeleteProcessor. */ -public abstract class JavaSafeDeleteProcessorCompat extends JavaSafeDeleteProcessor { - - @Override - public NonCodeUsageSearchInfo findUsages( - PsiElement element, PsiElement[] allElementsToDelete, List result) { - NonCodeUsageSearchInfo superResult = super.findUsages(element, allElementsToDelete, result); - return doFindUsages(element, allElementsToDelete, result, superResult); - } - - protected abstract NonCodeUsageSearchInfo doFindUsages( - PsiElement element, - PsiElement[] allElementsToDelete, - List result, - NonCodeUsageSearchInfo superResult); -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java deleted file mode 100644 index 1d8afe8e0c4..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/ui/icons/IconManagerCompat.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2023 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.ui.icons; - -import com.intellij.ui.IconManager; -import com.intellij.ui.icons.CoreIconManager; - -/** Compat class for IconManager. */ -public class IconManagerCompat { - - private IconManagerCompat() {} - - public static void activateCoreIconManager() throws Throwable { - IconManager.Companion.activate(new CoreIconManager()); - } - - public static void deactivate() { - IconManager.Companion.deactivate(); - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java deleted file mode 100644 index 9a48be5234c..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ChangeListAdapterCompat.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.vcs.changes.Change; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.ChangeListAdapter; -import java.util.Collection; - -/** Compat class for ChangeListAdapter. */ -public abstract class ChangeListAdapterCompat extends ChangeListAdapter { - @Override - public void changesMoved( - Collection changes, ChangeList fromList, ChangeList toList) { - doChangesMoved(changes, fromList, toList); - } - - protected abstract void doChangesMoved( - Collection changes, ChangeList fromList, ChangeList toList); -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java b/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java deleted file mode 100644 index 488b0d071af..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/FakeRevisionCompat.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.changes.FakeRevision; - -/** Compat class for FakeRevision constructor changes. */ -public class FakeRevisionCompat extends FakeRevision { - public FakeRevisionCompat(Project project, FilePath file) { - super(project, file); - } -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java b/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java deleted file mode 100644 index a96e661b15b..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/changes/ui/ChangesListViewCreator.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 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.vcs.changes.ui; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.changes.ui.ChangesListView; - -/** Compat class to initialize ChangesListView. */ -public final class ChangesListViewCreator { - public static ChangesListView create(Project project, boolean showCheckboxes) { - return new ChangesListView(project, showCheckboxes) {}; - } - - private ChangesListViewCreator() {} -} diff --git a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java b/sdkcompat/v243/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java deleted file mode 100644 index 4d97a49debf..00000000000 --- a/sdkcompat/v243/com/google/idea/sdkcompat/vcs/impl/VcsBaseContentProviderDelegator.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2024 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.vcs.impl; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.impl.LineStatusTrackerBaseContentUtil; -import com.intellij.openapi.vcs.impl.VcsBaseContentProvider; -import com.intellij.openapi.vfs.VirtualFile; - -/** Compat class that provide VcsBaseContentProvider delegator. */ -public class VcsBaseContentProviderDelegator { - private final Project project; - - public VcsBaseContentProviderDelegator(Project project) { - this.project = project; - } - - public boolean isSupported(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.isSupported(project, file); - } - - public VcsBaseContentProvider.BaseContent getBaseRevision(VirtualFile file) { - return LineStatusTrackerBaseContentUtil.getBaseRevision(project, file); - } -} From 5c4c0c1a854f630f49067221b23f9e6a8375db00 Mon Sep 17 00:00:00 2001 From: Daniel Brauner Date: Wed, 15 Jan 2025 22:01:22 +0100 Subject: [PATCH 3/4] Removed up cpp/sdkcompat --- cpp/BUILD | 1 - cpp/sdkcompat/BUILD | 14 --------- cpp/sdkcompat/v223/BUILD | 5 ---- .../OCWorkspaceModifiableModelDisposer.java | 28 ------------------ cpp/sdkcompat/v231/BUILD | 5 ---- .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- cpp/sdkcompat/v232/BUILD | 5 ---- .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- cpp/sdkcompat/v233/BUILD | 5 ---- .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- cpp/sdkcompat/v241/BUILD | 19 ------------ .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- cpp/sdkcompat/v242/BUILD | 19 ------------ .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- cpp/sdkcompat/v243/BUILD | 19 ------------ .../OCWorkspaceModifiableModelDisposer.java | 29 ------------------- .../qsync/CcProjectModelUpdateOperation.java | 3 +- 17 files changed, 2 insertions(+), 295 deletions(-) delete mode 100644 cpp/sdkcompat/BUILD delete mode 100644 cpp/sdkcompat/v223/BUILD delete mode 100644 cpp/sdkcompat/v223/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v231/BUILD delete mode 100644 cpp/sdkcompat/v231/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v232/BUILD delete mode 100644 cpp/sdkcompat/v232/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v233/BUILD delete mode 100644 cpp/sdkcompat/v233/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v241/BUILD delete mode 100644 cpp/sdkcompat/v241/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v242/BUILD delete mode 100644 cpp/sdkcompat/v242/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java delete mode 100644 cpp/sdkcompat/v243/BUILD delete mode 100644 cpp/sdkcompat/v243/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java diff --git a/cpp/BUILD b/cpp/BUILD index 46c8a8a28f9..527fc933772 100644 --- a/cpp/BUILD +++ b/cpp/BUILD @@ -32,7 +32,6 @@ java_library( deps = [ "//base", "//common/experiments", - "//cpp/sdkcompat", "//proto:proto_deps", "//querysync", "//querysync/java/com/google/idea/blaze/qsync/project:project_java_proto", diff --git a/cpp/sdkcompat/BUILD b/cpp/sdkcompat/BUILD deleted file mode 100644 index a5de3e7b3c0..00000000000 --- a/cpp/sdkcompat/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -load( - "//intellij_platform_sdk:build_defs.bzl", - "select_for_plugin_api", -) - -java_library( - name = "sdkcompat", - srcs = select_for_plugin_api({ - "clion-2024.2": ["//cpp/sdkcompat/v242"], - "clion-2024.3": ["//cpp/sdkcompat/v243"], - }), - visibility = ["//cpp:__pkg__"], - deps = ["//intellij_platform_sdk:plugin_api"], -) diff --git a/cpp/sdkcompat/v223/BUILD b/cpp/sdkcompat/v223/BUILD deleted file mode 100644 index a657623971e..00000000000 --- a/cpp/sdkcompat/v223/BUILD +++ /dev/null @@ -1,5 +0,0 @@ -filegroup( - name = "v223", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v223/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v223/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2147887a48e..00000000000 --- a/cpp/sdkcompat/v223/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - modifiableModel.dispose(); - } -} diff --git a/cpp/sdkcompat/v231/BUILD b/cpp/sdkcompat/v231/BUILD deleted file mode 100644 index 7c6e327c7d1..00000000000 --- a/cpp/sdkcompat/v231/BUILD +++ /dev/null @@ -1,5 +0,0 @@ -filegroup( - name = "v231", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v231/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v231/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v231/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/sdkcompat/v232/BUILD b/cpp/sdkcompat/v232/BUILD deleted file mode 100644 index bd0bbd35254..00000000000 --- a/cpp/sdkcompat/v232/BUILD +++ /dev/null @@ -1,5 +0,0 @@ -filegroup( - name = "v232", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v232/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v232/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v232/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/sdkcompat/v233/BUILD b/cpp/sdkcompat/v233/BUILD deleted file mode 100644 index 71f1dff2bc4..00000000000 --- a/cpp/sdkcompat/v233/BUILD +++ /dev/null @@ -1,5 +0,0 @@ -filegroup( - name = "v233", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v233/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v233/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v233/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/sdkcompat/v241/BUILD b/cpp/sdkcompat/v241/BUILD deleted file mode 100644 index a8df8acebaf..00000000000 --- a/cpp/sdkcompat/v241/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v241", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v241/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v241/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v241/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/sdkcompat/v242/BUILD b/cpp/sdkcompat/v242/BUILD deleted file mode 100644 index 7c0b9ef2cd1..00000000000 --- a/cpp/sdkcompat/v242/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v242", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v242/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v242/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v242/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/sdkcompat/v243/BUILD b/cpp/sdkcompat/v243/BUILD deleted file mode 100644 index 98f964e8e62..00000000000 --- a/cpp/sdkcompat/v243/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v243", - srcs = glob(["**/*.java"]), - visibility = ["//cpp/sdkcompat:__pkg__"], -) diff --git a/cpp/sdkcompat/v243/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java b/cpp/sdkcompat/v243/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java deleted file mode 100644 index 2a493b7886c..00000000000 --- a/cpp/sdkcompat/v243/com/google/idea/blaze/cpp/qsync/OCWorkspaceModifiableModelDisposer.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2023 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.blaze.cpp.qsync; - -import com.intellij.openapi.util.Disposer; -import com.jetbrains.cidr.lang.workspace.OCWorkspace; - -/** SDK compat class for {@link OCWorkspace.ModifiableModel} */ -public class OCWorkspaceModifiableModelDisposer { - - private OCWorkspaceModifiableModelDisposer() {} - - public static void dispose(OCWorkspace.ModifiableModel modifiableModel) { - Disposer.dispose(modifiableModel); - } -} diff --git a/cpp/src/com/google/idea/blaze/cpp/qsync/CcProjectModelUpdateOperation.java b/cpp/src/com/google/idea/blaze/cpp/qsync/CcProjectModelUpdateOperation.java index f151e897a6c..8ca7cd243d7 100644 --- a/cpp/src/com/google/idea/blaze/cpp/qsync/CcProjectModelUpdateOperation.java +++ b/cpp/src/com/google/idea/blaze/cpp/qsync/CcProjectModelUpdateOperation.java @@ -38,6 +38,7 @@ import com.intellij.openapi.application.WriteAction; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.progress.EmptyProgressIndicator; +import com.intellij.openapi.util.Disposer; import com.intellij.util.containers.MultiMap; import com.jetbrains.cidr.lang.CLanguageKind; import com.jetbrains.cidr.lang.toolchains.CidrCompilerSwitches; @@ -221,6 +222,6 @@ private void processCompilerSettings() { @Override public void dispose() { - OCWorkspaceModifiableModelDisposer.dispose(modifiableOcWorkspace); + Disposer.dispose(modifiableOcWorkspace); } } From 46b37d7bd3e4fc3fc503c54d0a22d6435e226527 Mon Sep 17 00:00:00 2001 From: Daniel Brauner Date: Wed, 15 Jan 2025 22:08:56 +0100 Subject: [PATCH 4/4] Clean up clwb/sdkcompat - Inlined redundant compats - Removed unused compats --- clwb/sdkcompat/v223/BUILD | 19 ---------- .../clwb/BazelCNotificationProvider.java | 36 ------------------ .../blaze/clwb/CLionNotificationProvider.java | 37 ------------------- .../blaze/clwb/MSVCCompilerVersionCompat.java | 17 --------- clwb/sdkcompat/v231/BUILD | 19 ---------- .../clwb/BazelCNotificationProvider.java | 36 ------------------ .../blaze/clwb/CLionNotificationProvider.java | 37 ------------------- .../blaze/clwb/MSVCCompilerVersionCompat.java | 30 --------------- clwb/sdkcompat/v232/BUILD | 19 ---------- .../clwb/BazelCNotificationProvider.java | 36 ------------------ .../blaze/clwb/CLionNotificationProvider.java | 37 ------------------- .../blaze/clwb/MSVCCompilerVersionCompat.java | 31 ---------------- clwb/sdkcompat/v233/BUILD | 19 ---------- .../clwb/BazelCNotificationProvider.java | 36 ------------------ .../blaze/clwb/CLionNotificationProvider.java | 37 ------------------- .../blaze/clwb/MSVCCompilerVersionCompat.java | 31 ---------------- clwb/sdkcompat/v241/BUILD | 19 ---------- .../clwb/BazelCNotificationProvider.java | 36 ------------------ .../blaze/clwb/CLionNotificationProvider.java | 37 ------------------- .../blaze/clwb/MSVCCompilerVersionCompat.java | 31 ---------------- .../blaze/clwb/CLionNotificationProvider.kt | 2 +- .../blaze/clwb/MSVCCompilerVersionCompat.java | 31 ---------------- .../clwb/BazelCNotificationProvider.java | 37 ------------------- .../blaze/clwb/CLionNotificationProvider.kt | 2 +- .../blaze/clwb/MSVCCompilerVersionCompat.java | 31 ---------------- .../clwb/BazelCNotificationProvider.java | 0 .../blaze/clwb/MSVCEnvironmentProvider.java | 10 ++++- 27 files changed, 10 insertions(+), 703 deletions(-) delete mode 100644 clwb/sdkcompat/v223/BUILD delete mode 100644 clwb/sdkcompat/v223/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v223/com/google/idea/blaze/clwb/CLionNotificationProvider.java delete mode 100644 clwb/sdkcompat/v223/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v231/BUILD delete mode 100644 clwb/sdkcompat/v231/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v231/com/google/idea/blaze/clwb/CLionNotificationProvider.java delete mode 100644 clwb/sdkcompat/v231/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v232/BUILD delete mode 100644 clwb/sdkcompat/v232/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v232/com/google/idea/blaze/clwb/CLionNotificationProvider.java delete mode 100644 clwb/sdkcompat/v232/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v233/BUILD delete mode 100644 clwb/sdkcompat/v233/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v233/com/google/idea/blaze/clwb/CLionNotificationProvider.java delete mode 100644 clwb/sdkcompat/v233/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v241/BUILD delete mode 100644 clwb/sdkcompat/v241/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v241/com/google/idea/blaze/clwb/CLionNotificationProvider.java delete mode 100644 clwb/sdkcompat/v241/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v242/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java delete mode 100644 clwb/sdkcompat/v243/com/google/idea/blaze/clwb/BazelCNotificationProvider.java delete mode 100644 clwb/sdkcompat/v243/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java rename clwb/{sdkcompat/v242 => src}/com/google/idea/blaze/clwb/BazelCNotificationProvider.java (100%) diff --git a/clwb/sdkcompat/v223/BUILD b/clwb/sdkcompat/v223/BUILD deleted file mode 100644 index adb6cf1ab6a..00000000000 --- a/clwb/sdkcompat/v223/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v223", - srcs = glob(["**/*.java"]), - visibility = ["//clwb/sdkcompat:__pkg__"], -) diff --git a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index 0648eac40b8..00000000000 --- a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.wizard2.BazelNotificationProvider; -import com.intellij.openapi.vfs.VirtualFile; - -import com.jetbrains.cidr.lang.OCLanguageUtilsBase; -import org.jetbrains.annotations.NotNull; - -/** - * Provide notification for C-family files temporarily until moving to new CLion project status - * api. - */ -// #api241 -public class BazelCNotificationProvider extends BazelNotificationProvider { - - @Override - protected boolean isProjectAwareFile(@NotNull VirtualFile file) { - return OCLanguageUtilsBase.isSupported(file.getFileType()); - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/CLionNotificationProvider.java b/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/CLionNotificationProvider.java deleted file mode 100644 index 60163e17311..00000000000 --- a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/CLionNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.settings.Blaze; -import com.intellij.openapi.project.Project; -import com.intellij.ui.EditorNotificationProvider; -import com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider; - -// #api241 -public class CLionNotificationProvider { - - public static void register(Project project) { - if (Blaze.isBlazeProject(project)) { - // Note: We want to remove the CMake notification banner in case that the project is Bazel. - var exPoint = EditorNotificationProvider.EP_NAME.getPoint(project); - for (var extension : exPoint.getExtensions()) { - if (extension instanceof CMakeNotificationProvider) { - exPoint.unregisterExtension(extension); - } - } - } - } -} diff --git a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 5575d7ebbf7..00000000000 --- a/clwb/sdkcompat/v223/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; - -import java.io.File; -import javax.annotation.Nullable; - -// #api223 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion() {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - return new ArchAndVersion(); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { } -} diff --git a/clwb/sdkcompat/v231/BUILD b/clwb/sdkcompat/v231/BUILD deleted file mode 100644 index 6cf3791185f..00000000000 --- a/clwb/sdkcompat/v231/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v231", - srcs = glob(["**/*.java"]), - visibility = ["//clwb/sdkcompat:__pkg__"], -) diff --git a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index 0648eac40b8..00000000000 --- a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.wizard2.BazelNotificationProvider; -import com.intellij.openapi.vfs.VirtualFile; - -import com.jetbrains.cidr.lang.OCLanguageUtilsBase; -import org.jetbrains.annotations.NotNull; - -/** - * Provide notification for C-family files temporarily until moving to new CLion project status - * api. - */ -// #api241 -public class BazelCNotificationProvider extends BazelNotificationProvider { - - @Override - protected boolean isProjectAwareFile(@NotNull VirtualFile file) { - return OCLanguageUtilsBase.isSupported(file.getFileType()); - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/CLionNotificationProvider.java b/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/CLionNotificationProvider.java deleted file mode 100644 index 60163e17311..00000000000 --- a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/CLionNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.settings.Blaze; -import com.intellij.openapi.project.Project; -import com.intellij.ui.EditorNotificationProvider; -import com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider; - -// #api241 -public class CLionNotificationProvider { - - public static void register(Project project) { - if (Blaze.isBlazeProject(project)) { - // Note: We want to remove the CMake notification banner in case that the project is Bazel. - var exPoint = EditorNotificationProvider.EP_NAME.getPoint(project); - for (var extension : exPoint.getExtensions()) { - if (extension instanceof CMakeNotificationProvider) { - exPoint.unregisterExtension(extension); - } - } - } - } -} diff --git a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 6fd8f5fca24..00000000000 --- a/clwb/sdkcompat/v231/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api231 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCCompilerToVersionCacheService.ArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v232/BUILD b/clwb/sdkcompat/v232/BUILD deleted file mode 100644 index 1cd74407b29..00000000000 --- a/clwb/sdkcompat/v232/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v232", - srcs = glob(["**/*.java"]), - visibility = ["//clwb/sdkcompat:__pkg__"], -) diff --git a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index 0648eac40b8..00000000000 --- a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.wizard2.BazelNotificationProvider; -import com.intellij.openapi.vfs.VirtualFile; - -import com.jetbrains.cidr.lang.OCLanguageUtilsBase; -import org.jetbrains.annotations.NotNull; - -/** - * Provide notification for C-family files temporarily until moving to new CLion project status - * api. - */ -// #api241 -public class BazelCNotificationProvider extends BazelNotificationProvider { - - @Override - protected boolean isProjectAwareFile(@NotNull VirtualFile file) { - return OCLanguageUtilsBase.isSupported(file.getFileType()); - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/CLionNotificationProvider.java b/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/CLionNotificationProvider.java deleted file mode 100644 index 60163e17311..00000000000 --- a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/CLionNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.settings.Blaze; -import com.intellij.openapi.project.Project; -import com.intellij.ui.EditorNotificationProvider; -import com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider; - -// #api241 -public class CLionNotificationProvider { - - public static void register(Project project) { - if (Blaze.isBlazeProject(project)) { - // Note: We want to remove the CMake notification banner in case that the project is Bazel. - var exPoint = EditorNotificationProvider.EP_NAME.getPoint(project); - for (var extension : exPoint.getExtensions()) { - if (extension instanceof CMakeNotificationProvider) { - exPoint.unregisterExtension(extension); - } - } - } - } -} diff --git a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 7c6e36c2768..00000000000 --- a/clwb/sdkcompat/v232/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCArchAndVersion; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api232 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v233/BUILD b/clwb/sdkcompat/v233/BUILD deleted file mode 100644 index fc4f539c09b..00000000000 --- a/clwb/sdkcompat/v233/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v233", - srcs = glob(["**/*.java"]), - visibility = ["//clwb/sdkcompat:__pkg__"], -) diff --git a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index 0648eac40b8..00000000000 --- a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.wizard2.BazelNotificationProvider; -import com.intellij.openapi.vfs.VirtualFile; - -import com.jetbrains.cidr.lang.OCLanguageUtilsBase; -import org.jetbrains.annotations.NotNull; - -/** - * Provide notification for C-family files temporarily until moving to new CLion project status - * api. - */ -// #api241 -public class BazelCNotificationProvider extends BazelNotificationProvider { - - @Override - protected boolean isProjectAwareFile(@NotNull VirtualFile file) { - return OCLanguageUtilsBase.isSupported(file.getFileType()); - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/CLionNotificationProvider.java b/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/CLionNotificationProvider.java deleted file mode 100644 index 60163e17311..00000000000 --- a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/CLionNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.settings.Blaze; -import com.intellij.openapi.project.Project; -import com.intellij.ui.EditorNotificationProvider; -import com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider; - -// #api241 -public class CLionNotificationProvider { - - public static void register(Project project) { - if (Blaze.isBlazeProject(project)) { - // Note: We want to remove the CMake notification banner in case that the project is Bazel. - var exPoint = EditorNotificationProvider.EP_NAME.getPoint(project); - for (var extension : exPoint.getExtensions()) { - if (extension instanceof CMakeNotificationProvider) { - exPoint.unregisterExtension(extension); - } - } - } - } -} diff --git a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 7c6e36c2768..00000000000 --- a/clwb/sdkcompat/v233/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCArchAndVersion; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api232 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v241/BUILD b/clwb/sdkcompat/v241/BUILD deleted file mode 100644 index 101cb351ec7..00000000000 --- a/clwb/sdkcompat/v241/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2024 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. - -filegroup( - name = "v241", - srcs = glob(["**/*.java"]), - visibility = ["//clwb/sdkcompat:__pkg__"], -) diff --git a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index 0648eac40b8..00000000000 --- a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.wizard2.BazelNotificationProvider; -import com.intellij.openapi.vfs.VirtualFile; - -import com.jetbrains.cidr.lang.OCLanguageUtilsBase; -import org.jetbrains.annotations.NotNull; - -/** - * Provide notification for C-family files temporarily until moving to new CLion project status - * api. - */ -// #api241 -public class BazelCNotificationProvider extends BazelNotificationProvider { - - @Override - protected boolean isProjectAwareFile(@NotNull VirtualFile file) { - return OCLanguageUtilsBase.isSupported(file.getFileType()); - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/CLionNotificationProvider.java b/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/CLionNotificationProvider.java deleted file mode 100644 index 60163e17311..00000000000 --- a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/CLionNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.google.idea.blaze.base.settings.Blaze; -import com.intellij.openapi.project.Project; -import com.intellij.ui.EditorNotificationProvider; -import com.jetbrains.cidr.cpp.cmake.workspace.CMakeNotificationProvider; - -// #api241 -public class CLionNotificationProvider { - - public static void register(Project project) { - if (Blaze.isBlazeProject(project)) { - // Note: We want to remove the CMake notification banner in case that the project is Bazel. - var exPoint = EditorNotificationProvider.EP_NAME.getPoint(project); - for (var extension : exPoint.getExtensions()) { - if (extension instanceof CMakeNotificationProvider) { - exPoint.unregisterExtension(extension); - } - } - } - } -} diff --git a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 7c6e36c2768..00000000000 --- a/clwb/sdkcompat/v241/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCArchAndVersion; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api232 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/CLionNotificationProvider.kt b/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/CLionNotificationProvider.kt index 01cbc0d57df..ecf6ba4c902 100644 --- a/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/CLionNotificationProvider.kt +++ b/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/CLionNotificationProvider.kt @@ -56,7 +56,7 @@ private fun isBazelAwareFile(project: Project, file: VirtualFile): Boolean { return project.basePath != null } -// #api241 +// #api242 @Service(Service.Level.APP) class CLionNotificationProvider : ProjectFixesProvider, WidgetStatusProvider, EditorNotificationWarningProvider, Disposable.Default { diff --git a/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 7c6e36c2768..00000000000 --- a/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCArchAndVersion; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api232 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/BazelCNotificationProvider.java deleted file mode 100644 index e7bbae66b95..00000000000 --- a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/BazelCNotificationProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 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.blaze.clwb; - -import com.intellij.openapi.fileEditor.FileEditor; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.ui.EditorNotificationProvider; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; -import java.util.function.Function; - -// #api241 -class BazelCNotificationProvider implements EditorNotificationProvider { - - @Override - public @Nullable Function collectNotificationData( - @NotNull Project project, @NotNull VirtualFile virtualFile) { - return null; - } -} \ No newline at end of file diff --git a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/CLionNotificationProvider.kt b/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/CLionNotificationProvider.kt index e9453a4cf33..127816b3d18 100644 --- a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/CLionNotificationProvider.kt +++ b/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/CLionNotificationProvider.kt @@ -58,7 +58,7 @@ private fun isBazelAwareFile(project: Project, file: VirtualFile): Boolean { return project.basePath != null } -// #api241 +// #api242 @Service(Service.Level.APP) class CLionNotificationProvider : ProjectFixesProvider, WidgetStatusProvider, EditorNotificationWarningProvider, Disposable.Default { diff --git a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java b/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java deleted file mode 100644 index 7c6e36c2768..00000000000 --- a/clwb/sdkcompat/v243/com/google/idea/blaze/clwb/MSVCCompilerVersionCompat.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.google.idea.blaze.clwb; - -import com.intellij.openapi.application.ApplicationManager; -import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; -import com.jetbrains.cidr.cpp.toolchains.MSVC; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCArchAndVersion; -import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; -import java.io.File; -import javax.annotation.Nullable; - -// #api232 -public class MSVCCompilerVersionCompat { - public record ArchAndVersion(MSVCArchAndVersion delegate) {} - - public static @Nullable ArchAndVersion getCompilerVersion(File compiler) { - final var service = ApplicationManager.getApplication() - .getService(MSVCCompilerToVersionCacheService.class); - - final var result = service.getCompilerVersion(compiler.getAbsolutePath()); - if (result == null) { - return null; - } - - return new ArchAndVersion(result); - } - - public static void setEnvironmentVersion(CPPEnvironment environment, ArchAndVersion version) { - final var msvc = (MSVC) environment.getToolSet(); - msvc.setToolsVersion(version.delegate); - } -} diff --git a/clwb/sdkcompat/v242/com/google/idea/blaze/clwb/BazelCNotificationProvider.java b/clwb/src/com/google/idea/blaze/clwb/BazelCNotificationProvider.java similarity index 100% rename from clwb/sdkcompat/v242/com/google/idea/blaze/clwb/BazelCNotificationProvider.java rename to clwb/src/com/google/idea/blaze/clwb/BazelCNotificationProvider.java diff --git a/clwb/src/com/google/idea/blaze/clwb/MSVCEnvironmentProvider.java b/clwb/src/com/google/idea/blaze/clwb/MSVCEnvironmentProvider.java index 07b29282dce..0df93c63d02 100644 --- a/clwb/src/com/google/idea/blaze/clwb/MSVCEnvironmentProvider.java +++ b/clwb/src/com/google/idea/blaze/clwb/MSVCEnvironmentProvider.java @@ -19,6 +19,7 @@ import com.google.idea.blaze.cpp.BlazeCompilerSettings; import com.google.idea.blaze.cpp.CompilerVersionUtil; import com.google.idea.blaze.cpp.CppEnvironmentProvider; +import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.io.FileUtil; @@ -27,6 +28,8 @@ import com.jetbrains.cidr.cpp.toolchains.CPPEnvironment; import com.jetbrains.cidr.cpp.toolchains.CPPToolSet.Kind; import com.jetbrains.cidr.cpp.toolchains.CPPToolchains; +import com.jetbrains.cidr.cpp.toolchains.MSVC; +import com.jetbrains.cidr.cpp.toolchains.msvc.MSVCCompilerToVersionCacheService; import com.jetbrains.cidr.lang.CLanguageKind; import com.jetbrains.cidr.lang.toolchains.CidrToolEnvironment; import com.jetbrains.cidr.toolchains.OSType; @@ -74,7 +77,10 @@ class MSVCEnvironmentProvider implements CppEnvironmentProvider { return null; } - final var version = MSVCCompilerVersionCompat.getCompilerVersion(compiler); + final var version = ApplicationManager.getApplication() + .getService(MSVCCompilerToVersionCacheService.class) + .getCompilerVersion(compiler.getAbsolutePath()); + if (version == null) { LOG.warn("Could not derive arch and version."); return null; @@ -86,7 +92,7 @@ class MSVCEnvironmentProvider implements CppEnvironmentProvider { toolchain.setToolSetPath(toolSetPath); final var environment = new CPPEnvironment(toolchain); - MSVCCompilerVersionCompat.setEnvironmentVersion(environment, version); + ((MSVC) environment.getToolSet()).setToolsVersion(version); return environment; }