mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Safe-Push into master
GitOrigin-RevId: f26582368f44c0859b4bbd3f5cc8064d19051e0a
This commit is contained in:
+4
-4
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.allopen-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:allopen-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:allopen-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.20-dev-8143/allopen-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.30-dev-222/allopen-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>ddf72df178668a0deab4460fcfd64642f823b9834b8a88102a7bf4145eca0efe</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.20-dev-8143/allopen-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.30-dev-222/allopen-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.20-dev-8143/allopen-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/allopen-compiler-plugin-for-ide/1.9.30-dev-222/allopen-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.analysis-api-providers" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:analysis-api-providers-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:analysis-api-providers-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.20-dev-8143/analysis-api-providers-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>89fdf915639b991a00e24209669f8eabf2127bd6ee02247adc81e328df5632fb</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.30-dev-222/analysis-api-providers-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>c748938a365d687d79d8692fdc4db8477a053b195344765ae0d8fbd548bd7c7e</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.20-dev-8143/analysis-api-providers-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.30-dev-222/analysis-api-providers-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.20-dev-8143/analysis-api-providers-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-api-providers-for-ide/1.9.30-dev-222/analysis-api-providers-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.analysis-project-structure" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:analysis-project-structure-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:analysis-project-structure-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.20-dev-8143/analysis-project-structure-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>ec3a35f2cb718777d77265c84165b562a8f666526ea5c9073b65f0df8f3a0b94</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.30-dev-222/analysis-project-structure-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>8f96f27656f1fb78b40a9cefb7a987af0e8672ff4d9324c6bc5cea3fcde40b9b</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.20-dev-8143/analysis-project-structure-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.30-dev-222/analysis-project-structure-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.20-dev-8143/analysis-project-structure-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/analysis-project-structure-for-ide/1.9.30-dev-222/analysis-project-structure-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.android-extensions-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:android-extensions-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:android-extensions-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.20-dev-8143/android-extensions-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>a7007b8bbef5f9f019e0153eb78b1ddb5cf4e59cb69f66297e9fddb9edac0a66</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.30-dev-222/android-extensions-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>893d752521e9103097db28bb362f2aa54702d3b50c40ea42960305525374e590</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.20-dev-8143/android-extensions-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.30-dev-222/android-extensions-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.20-dev-8143/android-extensions-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/android-extensions-compiler-plugin-for-ide/1.9.30-dev-222/android-extensions-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.assignment-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:assignment-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:assignment-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.20-dev-8143/assignment-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>7d68c0df49e2a70e5629f790cd0b339cbfc5341a2e5bf6d2bbfda16abf7d4285</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.30-dev-222/assignment-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>5fbe701b504ad9f6880942c20f5966b1134d0c4ca82e99463854d1a0ad6bb3b3</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.20-dev-8143/assignment-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.30-dev-222/assignment-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.20-dev-8143/assignment-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/assignment-compiler-plugin-for-ide/1.9.30-dev-222/assignment-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.20-dev-8143/high-level-api-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>bf44c46253233cf22b1cb51d817799ae22b1a9d24067a9cbbd731e5ab6caded4</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.30-dev-222/high-level-api-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>3515fb87590708a6205ec8e6f64fb9175824f5fc7c323a1763dc5144bcd45dfe</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.20-dev-8143/high-level-api-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.30-dev-222/high-level-api-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.20-dev-8143/high-level-api-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-for-ide/1.9.30-dev-222/high-level-api-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api-fe10" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fe10-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fe10-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.20-dev-8143/high-level-api-fe10-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>790c9d1ef0da1f56904a3233150ff8b70a6e8d86839e4e5bfa47e6c8a7897154</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.30-dev-222/high-level-api-fe10-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>538fd570d5f09e9116e44546d3206cff703b333c5211ef6e9f02817a265a1473</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.20-dev-8143/high-level-api-fe10-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.30-dev-222/high-level-api-fe10-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.20-dev-8143/high-level-api-fe10-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fe10-for-ide/1.9.30-dev-222/high-level-api-fe10-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api-fir" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fir-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fir-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.20-dev-8143/high-level-api-fir-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>4861094faece32eec7fbab70599af86123ef27a5c40b908b32e56255657a4d39</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.30-dev-222/high-level-api-fir-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>f5b4fc8d05b9eb687958b4ceea43ed79e7d3c61df68ffef67a38e01493ec0003</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.20-dev-8143/high-level-api-fir-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.30-dev-222/high-level-api-fir-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.20-dev-8143/high-level-api-fir-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-for-ide/1.9.30-dev-222/high-level-api-fir-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api-fir-tests" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fir-tests-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-fir-tests-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.20-dev-8143/high-level-api-fir-tests-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>eae32f4e907720e000ee9c0e89a8c2ae846c3b09c70484cf1fb99c198833078e</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.30-dev-222/high-level-api-fir-tests-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>e8dbf32719346abe35ccc2b06549ae0743693bcfa4af7cfe118a110aa2ebf2b3</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.20-dev-8143/high-level-api-fir-tests-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.30-dev-222/high-level-api-fir-tests-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.20-dev-8143/high-level-api-fir-tests-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-fir-tests-for-ide/1.9.30-dev-222/high-level-api-fir-tests-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api-impl-base" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-impl-base-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-impl-base-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.20-dev-8143/high-level-api-impl-base-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>d809596ffec9bb278947ec1fe3c20b18ac36d93e0beb8bd4918011ebe34e8a4c</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.30-dev-222/high-level-api-impl-base-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>c29bc388417b5044e026369109af24ec119662c61d5dfbcde4bb41b63ffa351d</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.20-dev-8143/high-level-api-impl-base-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.30-dev-222/high-level-api-impl-base-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.20-dev-8143/high-level-api-impl-base-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-for-ide/1.9.30-dev-222/high-level-api-impl-base-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.high-level-api-impl-base-tests" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-impl-base-tests-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:high-level-api-impl-base-tests-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.20-dev-8143/high-level-api-impl-base-tests-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>a3f332e6a539b64db0c3786183f72a4894901f0504e56d3cf24a98773b6e9818</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.30-dev-222/high-level-api-impl-base-tests-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>dfdcc48a0902ce3066948864e94099daa9e7c6261f8f193f38a304a3072c82b3</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.20-dev-8143/high-level-api-impl-base-tests-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.30-dev-222/high-level-api-impl-base-tests-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.20-dev-8143/high-level-api-impl-base-tests-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/high-level-api-impl-base-tests-for-ide/1.9.30-dev-222/high-level-api-impl-base-tests-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.incremental-compilation-impl-tests" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:incremental-compilation-impl-tests-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:incremental-compilation-impl-tests-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.20-dev-8143/incremental-compilation-impl-tests-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>2dbf046fc51ad2ab2a3e4ab1668a76a17039ab6d211748bded2d32dc80f598b0</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.30-dev-222/incremental-compilation-impl-tests-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>97b7766c0fb7b2abe8ac61e826b7ca86c6524cfdb2550e41f568e33a26675b8f</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.20-dev-8143/incremental-compilation-impl-tests-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.30-dev-222/incremental-compilation-impl-tests-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.20-dev-8143/incremental-compilation-impl-tests-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/incremental-compilation-impl-tests-for-ide/1.9.30-dev-222/incremental-compilation-impl-tests-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-build-common-tests" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-build-common-tests-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-build-common-tests-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.20-dev-8143/kotlin-build-common-tests-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>fd32673e172771aa481748ed3b5ae7c41d3bf57858a243d45a78ad9b9e317413</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.30-dev-222/kotlin-build-common-tests-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>8bc3cf8da11bcc47127c7037e05fca441932fb073eb55b175b48f637bac457a0</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.20-dev-8143/kotlin-build-common-tests-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.30-dev-222/kotlin-build-common-tests-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.20-dev-8143/kotlin-build-common-tests-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-build-common-tests-for-ide/1.9.30-dev-222/kotlin-build-common-tests-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-cli" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-cli-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-cli-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.20-dev-8143/kotlin-compiler-cli-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>8e9b234e635346b81c55784563829d3feb14ece392eba0d748921b33e77889c8</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.30-dev-222/kotlin-compiler-cli-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>5256676ec55e96ab5ae8c69155bfed2b5aabe3be688acb352fee49382ffb7996</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.20-dev-8143/kotlin-compiler-cli-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.30-dev-222/kotlin-compiler-cli-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.20-dev-8143/kotlin-compiler-cli-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-cli-for-ide/1.9.30-dev-222/kotlin-compiler-cli-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-common" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-common-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-common-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.20-dev-8143/kotlin-compiler-common-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>2d25341dddb8ba0e0c39a1499955315f2f44106833de8917f5009050a80edd45</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.30-dev-222/kotlin-compiler-common-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>d14ec9f5a6b76a184d077ae39609302855818b007df2c23f4238b26ab2c37385</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.20-dev-8143/kotlin-compiler-common-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.30-dev-222/kotlin-compiler-common-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.20-dev-8143/kotlin-compiler-common-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-common-for-ide/1.9.30-dev-222/kotlin-compiler-common-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-fe10" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-fe10-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-fe10-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.20-dev-8143/kotlin-compiler-fe10-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>ab90822d2c5c5971c4bf38c0be4f12ba58753293ab995ba13652d0446c345e2c</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.30-dev-222/kotlin-compiler-fe10-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>cd1da119d3819c6d5a7731a49ae9f0517e9e11d3943c2631b9e78be4d6269fb2</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.20-dev-8143/kotlin-compiler-fe10-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.30-dev-222/kotlin-compiler-fe10-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.20-dev-8143/kotlin-compiler-fe10-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fe10-for-ide/1.9.30-dev-222/kotlin-compiler-fe10-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-fir" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-fir-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-fir-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.20-dev-8143/kotlin-compiler-fir-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>6a5e30e7d2117f4cf318c6534a524259cedcc04b0747d5d8d934375b4c91a537</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.30-dev-222/kotlin-compiler-fir-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>948e68ef2fe646907a29bc51bf8bf51e4331a528e605dcff06e01fd6fa0e7086</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.20-dev-8143/kotlin-compiler-fir-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.30-dev-222/kotlin-compiler-fir-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.20-dev-8143/kotlin-compiler-fir-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-fir-for-ide/1.9.30-dev-222/kotlin-compiler-fir-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-ir" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-ir-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-ir-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.20-dev-8143/kotlin-compiler-ir-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>d7ca67c2016096cc8188406f403187fac067caa3e751c97775dd6ccbbe42bb52</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.30-dev-222/kotlin-compiler-ir-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>4f332ba31fb80dfdb714350fc6c2d248a4f395ad79d95a6c414eca0cb5f3e790</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.20-dev-8143/kotlin-compiler-ir-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.30-dev-222/kotlin-compiler-ir-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.20-dev-8143/kotlin-compiler-ir-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-ir-for-ide/1.9.30-dev-222/kotlin-compiler-ir-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-compiler-tests" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-tests-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-compiler-tests-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.20-dev-8143/kotlin-compiler-tests-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>4690fd58984f14ade528fd4b9871120275c57af5ece530ec1c46b0fc0a5ea568</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.30-dev-222/kotlin-compiler-tests-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>e58124ba3b3e54a075af11fbadf935ca6a588fd0047a21b70df9540a30f9fd7e</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.20-dev-8143/kotlin-compiler-tests-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.30-dev-222/kotlin-compiler-tests-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.20-dev-8143/kotlin-compiler-tests-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compiler-tests-for-ide/1.9.30-dev-222/kotlin-compiler-tests-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-gradle-statistics" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-gradle-statistics-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-gradle-statistics-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.20-dev-8143/kotlin-gradle-statistics-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>ef0252705e16616de7416052b549a3751776a4afd612f2dfd2aa8b5013c9a75d</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.30-dev-222/kotlin-gradle-statistics-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>6b7c85675af645d04329526c3b2a892950d6709d6068627a7c6b6e9e565d24a4</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.20-dev-8143/kotlin-gradle-statistics-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.30-dev-222/kotlin-gradle-statistics-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.20-dev-8143/kotlin-gradle-statistics-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-gradle-statistics-for-ide/1.9.30-dev-222/kotlin-gradle-statistics-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-jps-common" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-jps-common-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-jps-common-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.20-dev-8143/kotlin-jps-common-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>704a1119fb9d230dd1df129adeb81ddf549e48fbd33ff1c417636a218050b2de</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.30-dev-222/kotlin-jps-common-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>3096663591312558cdda2780da243b8fd1115ddb60d4901496344af024b22424</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.20-dev-8143/kotlin-jps-common-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.30-dev-222/kotlin-jps-common-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.20-dev-8143/kotlin-jps-common-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-jps-common-for-ide/1.9.30-dev-222/kotlin-jps-common-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-script-runtime" type="repository">
|
||||
<properties maven-id="org.jetbrains.kotlin:kotlin-script-runtime:1.9.20-dev-8143">
|
||||
<properties maven-id="org.jetbrains.kotlin:kotlin-script-runtime:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.20-dev-8143/kotlin-script-runtime-1.9.20-dev-8143.jar">
|
||||
<sha256sum>00965fa842543f930c8cbef0648b48b444c8571e1b30a8c3d3c6ceb5bec99701</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.30-dev-222/kotlin-script-runtime-1.9.30-dev-222.jar">
|
||||
<sha256sum>c8c0551c3a58b6a508452cd998ec643c54616c7b263eee93b2309c377cc88011</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.20-dev-8143/kotlin-script-runtime-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.30-dev-222/kotlin-script-runtime-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.20-dev-8143/kotlin-script-runtime-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-script-runtime/1.9.30-dev-222/kotlin-script-runtime-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-scripting-common" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-common:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-common:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.20-dev-8143/kotlin-scripting-common-1.9.20-dev-8143.jar">
|
||||
<sha256sum>e1e6d7c7c0d08c37d6940327d289f72b226910722855c4e12644891e15601f5f</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.30-dev-222/kotlin-scripting-common-1.9.30-dev-222.jar">
|
||||
<sha256sum>fb23eeab32ff3b668488bcd6364ccc8c184856708f80f93790cbdad10ae6a2df</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.20-dev-8143/kotlin-scripting-common-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.30-dev-222/kotlin-scripting-common-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.20-dev-8143/kotlin-scripting-common-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-common/1.9.30-dev-222/kotlin-scripting-common-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-scripting-compiler-impl" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-compiler-impl:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-compiler-impl:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.20-dev-8143/kotlin-scripting-compiler-impl-1.9.20-dev-8143.jar">
|
||||
<sha256sum>fbba3ed8915bc536f6d8033363f2b27652f16604df87c1a292dd1d14a88b73a3</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.30-dev-222/kotlin-scripting-compiler-impl-1.9.30-dev-222.jar">
|
||||
<sha256sum>a2dfb7446c62d612e6779fd7c7d711f4a2ef9df078135750c2946fb1c3a342c9</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.20-dev-8143/kotlin-scripting-compiler-impl-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.30-dev-222/kotlin-scripting-compiler-impl-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.20-dev-8143/kotlin-scripting-compiler-impl-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-compiler-impl/1.9.30-dev-222/kotlin-scripting-compiler-impl-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-scripting-jvm" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-scripting-jvm:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.20-dev-8143/kotlin-scripting-jvm-1.9.20-dev-8143.jar">
|
||||
<sha256sum>4292efd8dfd2ee0c22edf048f5d2420d21d3dfb563dc9bce26ade225ade7273c</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.30-dev-222/kotlin-scripting-jvm-1.9.30-dev-222.jar">
|
||||
<sha256sum>18f229e607d32cd92828ca4b9883d03530c0a5976993c26a9d60a81fb202565a</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.20-dev-8143/kotlin-scripting-jvm-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.30-dev-222/kotlin-scripting-jvm-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.20-dev-8143/kotlin-scripting-jvm-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-scripting-jvm/1.9.30-dev-222/kotlin-scripting-jvm-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-20
@@ -1,18 +1,9 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-stdlib" type="repository">
|
||||
<properties maven-id="org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20-dev-8143">
|
||||
<properties maven-id="org.jetbrains.kotlin:kotlin-stdlib:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.20-dev-8143/kotlin-stdlib-jdk8-1.9.20-dev-8143.jar">
|
||||
<sha256sum>1f71be99add6fb58560f6f588b7d7ef28b7dcc6f84a3d8a5d490ea6ca61f3a29</sha256sum>
|
||||
</artifact>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.20-dev-8143/kotlin-stdlib-1.9.20-dev-8143.jar">
|
||||
<sha256sum>465b9a646b1a79fea62ab55f09058873ce2a283764bb0d727611c2a03b610657</sha256sum>
|
||||
</artifact>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.20-dev-8143/kotlin-stdlib-common-1.9.20-dev-8143.jar">
|
||||
<sha256sum>0571192be26fb22f7b63d40351ffb5d9f7e6a4150df55f9e8bebe2623c400bb9</sha256sum>
|
||||
</artifact>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.20-dev-8143/kotlin-stdlib-jdk7-1.9.20-dev-8143.jar">
|
||||
<sha256sum>02bd856fe93d67afd252e9903f95ebd78e8a34507f211477e44a1a580f070584</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.30-dev-222/kotlin-stdlib-1.9.30-dev-222.jar">
|
||||
<sha256sum>045cc62b8df96cc13e466dce507d9ccb0b3a6950d91726ffb49d13ea0cf0264f</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
<exclude>
|
||||
@@ -23,17 +14,11 @@
|
||||
<root url="file://$PROJECT_DIR$/lib/annotations/kotlin" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.20-dev-8143/kotlin-stdlib-jdk8-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.20-dev-8143/kotlin-stdlib-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.20-dev-8143/kotlin-stdlib-common-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.20-dev-8143/kotlin-stdlib-jdk7-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.30-dev-222/kotlin-stdlib-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.9.20-dev-8143/kotlin-stdlib-jdk8-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.20-dev-8143/kotlin-stdlib-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.20-dev-8143/kotlin-stdlib-common-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.9.20-dev-8143/kotlin-stdlib-jdk7-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib/1.9.30-dev-222/kotlin-stdlib-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlin-stdlib-minimal-for-test" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-stdlib-minimal-for-test-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlin-stdlib-minimal-for-test-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.20-dev-8143/kotlin-stdlib-minimal-for-test-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>6c4df6978ac2dd6313c737583e58300148442add91932a008dcbcfb063704639</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.30-dev-222/kotlin-stdlib-minimal-for-test-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>15a6e80e211fb0e917439a6df18e37fcd6a9c1ae9fc97ec9ab893674e7cce13e</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.20-dev-8143/kotlin-stdlib-minimal-for-test-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.30-dev-222/kotlin-stdlib-minimal-for-test-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.20-dev-8143/kotlin-stdlib-minimal-for-test-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-stdlib-minimal-for-test-for-ide/1.9.30-dev-222/kotlin-stdlib-minimal-for-test-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.kotlinx-serialization-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlinx-serialization-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:kotlinx-serialization-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.20-dev-8143/kotlinx-serialization-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>511745d5976bfb0bce4a993f0f848e5e4f15558ac63e90f8b354d86d8e535aae</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.30-dev-222/kotlinx-serialization-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>f86d1be3a063b73ed92c056fa6ad93535a13997694cc8c8d39334bf70047655e</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.20-dev-8143/kotlinx-serialization-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.30-dev-222/kotlinx-serialization-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.20-dev-8143/kotlinx-serialization-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlinx-serialization-compiler-plugin-for-ide/1.9.30-dev-222/kotlinx-serialization-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.lombok-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:lombok-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:lombok-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.20-dev-8143/lombok-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>994e0de733fe43b3c2c594ec8c5ac8106e2372e14bcf0a60942c6ae23fe682b3</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.30-dev-222/lombok-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>2b95f437731ee0f52a202e456fbdc68f4efa06d319e1db72d7fde2a21cf2db88</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.20-dev-8143/lombok-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.30-dev-222/lombok-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.20-dev-8143/lombok-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/lombok-compiler-plugin-for-ide/1.9.30-dev-222/lombok-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.low-level-api-fir" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:low-level-api-fir-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:low-level-api-fir-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.20-dev-8143/low-level-api-fir-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>eb69492c21b257aaaccff158a4db8822efd77e9b61a06941fbcddc73cedd0fbe</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.30-dev-222/low-level-api-fir-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>8de74e90fb94d0d886a488450923421d0dba6edd19fd8c69b02d014ad0da565a</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.20-dev-8143/low-level-api-fir-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.30-dev-222/low-level-api-fir-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.20-dev-8143/low-level-api-fir-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/low-level-api-fir-for-ide/1.9.30-dev-222/low-level-api-fir-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+4
-4
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.noarg-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:noarg-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:noarg-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.20-dev-8143/noarg-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.30-dev-222/noarg-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>efb8097b25caed72eb220f0836959a6ed3d264a94f6a21233cb4c57a09c38b42</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.20-dev-8143/noarg-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.30-dev-222/noarg-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.20-dev-8143/noarg-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/noarg-compiler-plugin-for-ide/1.9.30-dev-222/noarg-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.parcelize-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:parcelize-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:parcelize-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.20-dev-8143/parcelize-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>e1cae6d063de2c43011204e3fdb8ea9b209a68742b6856d2b67d140f04074836</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.30-dev-222/parcelize-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>1ed1f85971b554df7c82caecdbec585a5333d494b72fd01d479bf60b72a0a000</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.20-dev-8143/parcelize-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.30-dev-222/parcelize-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.20-dev-8143/parcelize-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/parcelize-compiler-plugin-for-ide/1.9.30-dev-222/parcelize-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.sam-with-receiver-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:sam-with-receiver-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:sam-with-receiver-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.20-dev-8143/sam-with-receiver-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>59a4f1fae9b7a4d8c3ea3739f728c6ea6973612554aea0f210eb1543499227f1</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.30-dev-222/sam-with-receiver-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>15e4e444653c60b47612e8125950cf97375c573fd8f441e4b0ab0f79e69b5b46</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.20-dev-8143/sam-with-receiver-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.30-dev-222/sam-with-receiver-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.20-dev-8143/sam-with-receiver-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/sam-with-receiver-compiler-plugin-for-ide/1.9.30-dev-222/sam-with-receiver-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.scripting-compiler-plugin" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:scripting-compiler-plugin-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:scripting-compiler-plugin-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.20-dev-8143/scripting-compiler-plugin-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>e6babe8a19873e036c635f8219280bf8c67f1570eea9a2dcdbf5932fee2ed0d3</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.30-dev-222/scripting-compiler-plugin-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>2997253b6b0b78e238b9a20d3777b27c620415c7cbd17ddd4252d7ecbad4ed30</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.20-dev-8143/scripting-compiler-plugin-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.30-dev-222/scripting-compiler-plugin-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.20-dev-8143/scripting-compiler-plugin-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/scripting-compiler-plugin-for-ide/1.9.30-dev-222/scripting-compiler-plugin-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
+5
-5
@@ -1,18 +1,18 @@
|
||||
<component name="libraryTable">
|
||||
<library name="kotlinc.symbol-light-classes" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:symbol-light-classes-for-ide:1.9.20-dev-8143">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.kotlin:symbol-light-classes-for-ide:1.9.30-dev-222">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.20-dev-8143/symbol-light-classes-for-ide-1.9.20-dev-8143.jar">
|
||||
<sha256sum>6d093b58dc94e04727988716535b59240cefd326832f31036b8b13c54f3f47fa</sha256sum>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.30-dev-222/symbol-light-classes-for-ide-1.9.30-dev-222.jar">
|
||||
<sha256sum>61417bfd690fb05403b541b485b6668e108a7e161cec28e2275cd0b833b8d2a4</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.20-dev-8143/symbol-light-classes-for-ide-1.9.20-dev-8143.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.30-dev-222/symbol-light-classes-for-ide-1.9.30-dev-222.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.20-dev-8143/symbol-light-classes-for-ide-1.9.20-dev-8143-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/kotlin/symbol-light-classes-for-ide/1.9.30-dev-222/symbol-light-classes-for-ide-1.9.30-dev-222-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
Generated
+6
-2
@@ -1149,10 +1149,11 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fe10/kdoc/kotlin.base.fe10.kdoc.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fe10/kdoc/kotlin.base.fe10.kdoc.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fe10/obsolete-compat/kotlin.base.fe10.obsolete-compat.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fe10/obsolete-compat/kotlin.base.fe10.obsolete-compat.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fe10/plugin/kotlin.base.fe10.plugin.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fe10/plugin/kotlin.base.fe10.plugin.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fe10/project-structure/kotlin.base.fe10.project-structure.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fe10/project-structure/kotlin.base.fe10.project-structure.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fir/analysis-api-providers/kotlin.base.fir.analysis-api-providers.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fir/analysis-api-providers/kotlin.base.fir.analysis-api-providers.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fir/code-insight/kotlin.base.fir.code-insight.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fir/code-insight/kotlin.base.fir.code-insight.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/fir/project-structure/kotlin.base.fir.project-structure.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/fir/project-structure/kotlin.base.fir.project-structure.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/frontend-agnostic/kotlin.base.frontend-agnostic.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/frontend-agnostic/kotlin.base.frontend-agnostic.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/highlighting/kotlin.base.highlighting.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/highlighting/kotlin.base.highlighting.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/indices/kotlin.base.indices.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/indices/kotlin.base.indices.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/jps/kotlin.base.jps.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/jps/kotlin.base.jps.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/base/kdoc/kotlin.base.kdoc.iml" filepath="$PROJECT_DIR$/plugins/kotlin/base/kdoc/kotlin.base.kdoc.iml" />
|
||||
@@ -1242,6 +1243,7 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/completion/tests-k1/kotlin.completion.tests-k1.iml" filepath="$PROJECT_DIR$/plugins/kotlin/completion/tests-k1/kotlin.completion.tests-k1.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/completion/tests-shared/kotlin.completion.tests-shared.iml" filepath="$PROJECT_DIR$/plugins/kotlin/completion/tests-shared/kotlin.completion.tests-shared.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/copyright/kotlin.copyright.iml" filepath="$PROJECT_DIR$/plugins/kotlin/copyright/kotlin.copyright.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/copyright/fir-tests/kotlin.copyright.fir.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/copyright/fir-tests/kotlin.copyright.fir.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/copyright/tests/kotlin.copyright.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/copyright/tests/kotlin.copyright.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/core/kotlin.core.iml" filepath="$PROJECT_DIR$/plugins/kotlin/core/kotlin.core.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/core/tests/kotlin.core.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/core/tests/kotlin.core.tests.iml" />
|
||||
@@ -1266,7 +1268,9 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/tests/kotlin.gradle.gradle-tooling.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle-tooling/tests/kotlin.gradle.gradle-tooling.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/gradle/gradle/tests/kotlin.gradle.gradle.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/gradle/gradle/tests/kotlin.gradle.gradle.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/grazie/kotlin.grazie.iml" filepath="$PROJECT_DIR$/plugins/kotlin/grazie/kotlin.grazie.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/highlighting/kotlin.highlighting.iml" filepath="$PROJECT_DIR$/plugins/kotlin/highlighting/kotlin.highlighting.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-k1/kotlin.highlighting.k1.iml" filepath="$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-k1/kotlin.highlighting.k1.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-k2/kotlin.highlighting.k2.iml" filepath="$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-k2/kotlin.highlighting.k2.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-shared/kotlin.highlighting.shared.iml" filepath="$PROJECT_DIR$/plugins/kotlin/highlighting/highlighting-shared/kotlin.highlighting.shared.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/i18n/kotlin.i18n.iml" filepath="$PROJECT_DIR$/plugins/kotlin/i18n/kotlin.i18n.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/i18n/tests/kotlin.i18n.tests.iml" filepath="$PROJECT_DIR$/plugins/kotlin/i18n/tests/kotlin.i18n.tests.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugins/kotlin/idea/kotlin.idea.iml" filepath="$PROJECT_DIR$/plugins/kotlin/idea/kotlin.idea.iml" />
|
||||
|
||||
+8
-5
@@ -248,6 +248,10 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
|
||||
@Override
|
||||
public boolean visitCallableReferenceExpression(@NotNull UCallableReferenceExpression methodRef) {
|
||||
UExpression qualifierExpression = methodRef.getQualifierExpression();
|
||||
if (qualifierExpression != null) {
|
||||
qualifierExpression.accept(this);
|
||||
}
|
||||
RefElement refMethod = refManager.getReference(methodRef.getSourcePsi());
|
||||
if (refFrom == refMethod) {
|
||||
visitReferenceExpression(methodRef);
|
||||
@@ -641,18 +645,17 @@ public class RefJavaUtilImpl extends RefJavaUtil {
|
||||
return Integer.compare(getAccessNumber(a1), getAccessNumber(a2));
|
||||
}
|
||||
|
||||
@SuppressWarnings("StringEquality")
|
||||
private static int getAccessNumber(String a) {
|
||||
if (a == PsiModifier.PRIVATE) {
|
||||
if (PsiModifier.PRIVATE.equals(a)) {
|
||||
return 0;
|
||||
}
|
||||
if (a == PsiModifier.PACKAGE_LOCAL) {
|
||||
if (PsiModifier.PACKAGE_LOCAL.equals(a)) {
|
||||
return 1;
|
||||
}
|
||||
if (a == PsiModifier.PROTECTED) {
|
||||
if (PsiModifier.PROTECTED.equals(a)) {
|
||||
return 2;
|
||||
}
|
||||
if (a == PsiModifier.PUBLIC) return 3;
|
||||
if (PsiModifier.PUBLIC.equals(a)) return 3;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>TC.kt</file>
|
||||
<line>6</line>
|
||||
<description>Parameter <code>s</code> is not used</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1,10 @@
|
||||
fun main() {
|
||||
foo(1, "")
|
||||
}
|
||||
|
||||
fun foo(i: Int,
|
||||
s: String //todo wrongly marked as unused, because simple references in callables are treated as class references
|
||||
) {
|
||||
println("Foo $i"::toString)
|
||||
println(s::toString)
|
||||
}
|
||||
+13
@@ -44,6 +44,19 @@ class KotlinJavaApiUsageInspectionTest : JavaApiUsageInspectionTestBase() {
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
fun `test reference in callable reference`() {
|
||||
myFixture.setLanguageLevel(LanguageLevel.JDK_1_6)
|
||||
val withErrorMessage = "\"default charset \${<error descr=\"Usage of API documented as @since 1.7+\">StandardCharsets</error>.UTF_8}\"::toString"
|
||||
myFixture.testHighlighting(JvmLanguage.KOTLIN, """
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
fun main() {
|
||||
${withErrorMessage}
|
||||
}
|
||||
""".trimIndent())
|
||||
""::toString
|
||||
}
|
||||
|
||||
fun `test annotation`() {
|
||||
myFixture.setLanguageLevel(LanguageLevel.JDK_1_6)
|
||||
myFixture.testHighlighting(JvmLanguage.KOTLIN, """
|
||||
|
||||
+5
@@ -74,6 +74,11 @@ public class UnusedDeclarationKtTest20 extends AbstractUnusedDeclarationTest {
|
||||
doTest("deadCode/" + getTestName(true), myToolWrapper);
|
||||
}
|
||||
|
||||
public void testUsagesInCallableReceiver() {
|
||||
myTool.getSharedLocalInspectionTool().PARAMETER = true;
|
||||
doTest("deadCode/" + getTestName(true), myToolWrapper);
|
||||
}
|
||||
|
||||
public void testMainParameter() {
|
||||
myTool.getSharedLocalInspectionTool().PARAMETER = true;
|
||||
myTool.getSharedLocalInspectionTool().LOCAL_VARIABLE = false;
|
||||
|
||||
+5
-2
@@ -47,7 +47,6 @@ object KotlinPluginBuilder {
|
||||
"kotlin.base.scripting",
|
||||
"kotlin.base.analysis-api-providers",
|
||||
"kotlin.base.analysis",
|
||||
"kotlin.base.highlighting",
|
||||
"kotlin.base.code-insight",
|
||||
"kotlin.base.jps",
|
||||
"kotlin.base.analysis-api.utils",
|
||||
@@ -62,6 +61,7 @@ object KotlinPluginBuilder {
|
||||
"kotlin.base.fe10.highlighting",
|
||||
"kotlin.base.fe10.code-insight",
|
||||
"kotlin.base.fe10.obsolete-compat",
|
||||
"kotlin.base.fe10.project-structure",
|
||||
"kotlin.core",
|
||||
"kotlin.idea",
|
||||
"kotlin.fir.frontend-independent",
|
||||
@@ -156,6 +156,7 @@ object KotlinPluginBuilder {
|
||||
"kotlin.features-trainer",
|
||||
"kotlin.base.fir.analysis-api-providers",
|
||||
"kotlin.base.fir.code-insight",
|
||||
"kotlin.base.fir.project-structure",
|
||||
"kotlin.code-insight.api",
|
||||
"kotlin.code-insight.utils",
|
||||
"kotlin.code-insight.intentions-shared",
|
||||
@@ -181,7 +182,9 @@ object KotlinPluginBuilder {
|
||||
"kotlin.fir",
|
||||
"kotlin.searching.k2",
|
||||
"kotlin.searching.base",
|
||||
"kotlin.highlighting",
|
||||
"kotlin.highlighting.shared",
|
||||
"kotlin.highlighting.k1",
|
||||
"kotlin.highlighting.k2",
|
||||
"kotlin.uast.uast-kotlin-fir",
|
||||
"kotlin.uast.uast-kotlin-idea-fir",
|
||||
"kotlin.fir.fir-low-level-api-ide-impl",
|
||||
|
||||
+8
-8
@@ -17,7 +17,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EditInspectionToolsSettingsInSuppressedPlaceIntention implements IntentionAction {
|
||||
private String myId;
|
||||
private String myDisplayName;
|
||||
|
||||
@Override
|
||||
@@ -61,25 +60,26 @@ public class EditInspectionToolsSettingsInSuppressedPlaceIntention implements In
|
||||
|
||||
@Override
|
||||
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
|
||||
myId = getSuppressedId(editor, file);
|
||||
if (myId != null) {
|
||||
InspectionToolWrapper toolWrapper = getTool(project, file);
|
||||
String suppressedId = getSuppressedId(editor, file);
|
||||
if (suppressedId != null) {
|
||||
InspectionToolWrapper toolWrapper = getTool(project, file, suppressedId);
|
||||
if (toolWrapper == null) return false;
|
||||
myDisplayName = toolWrapper.getDisplayName();
|
||||
}
|
||||
return myId != null;
|
||||
return suppressedId != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private InspectionToolWrapper getTool(final Project project, final PsiFile file) {
|
||||
private static InspectionToolWrapper getTool(final Project project, final PsiFile file, final String suppressId) {
|
||||
if (suppressId == null) return null;
|
||||
final InspectionProjectProfileManager projectProfileManager = InspectionProjectProfileManager.getInstance(project);
|
||||
final InspectionProfileImpl inspectionProfile = projectProfileManager.getCurrentProfile();
|
||||
return inspectionProfile.getToolById(myId, file);
|
||||
return inspectionProfile.getToolById(suppressId, file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
|
||||
InspectionToolWrapper toolWrapper = getTool(project, file);
|
||||
InspectionToolWrapper toolWrapper = getTool(project, file, getSuppressedId(editor, file));
|
||||
if (toolWrapper == null) return;
|
||||
final InspectionProjectProfileManager projectProfileManager = InspectionProjectProfileManager.getInstance(project);
|
||||
final InspectionProfileImpl inspectionProfile = projectProfileManager.getCurrentProfile();
|
||||
|
||||
+10
-4
@@ -12,6 +12,8 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.psi.SmartPointerManager;
|
||||
import com.intellij.psi.SmartPsiElementPointer;
|
||||
import com.intellij.refactoring.BaseRefactoringProcessor;
|
||||
import com.intellij.refactoring.RefactoringBundle;
|
||||
import com.intellij.refactoring.listeners.RefactoringElementListener;
|
||||
@@ -156,14 +158,19 @@ public abstract class ChangeSignatureProcessorBase extends BaseRefactoringProces
|
||||
protected void performRefactoring(UsageInfo @NotNull [] usages) {
|
||||
RefactoringTransaction transaction = getTransaction();
|
||||
final ChangeInfo changeInfo = myChangeInfo;
|
||||
final RefactoringElementListener elementListener = transaction == null ? null : transaction.getElementListener(changeInfo.getMethod());
|
||||
final String fqn = CopyReferenceAction.elementToFqn(changeInfo.getMethod());
|
||||
PsiElement method = changeInfo.getMethod();
|
||||
final RefactoringElementListener elementListener = transaction == null ? null : transaction.getElementListener(method);
|
||||
final String fqn = CopyReferenceAction.elementToFqn(method);
|
||||
if (fqn != null) {
|
||||
SmartPsiElementPointer<PsiElement> pointer = SmartPointerManager.createPointer(method);
|
||||
UndoableAction action = new BasicUndoableAction() {
|
||||
@Override
|
||||
public void undo() {
|
||||
if (elementListener instanceof UndoRefactoringElementListener) {
|
||||
((UndoRefactoringElementListener)elementListener).undoElementMovedOrRenamed(changeInfo.getMethod(), fqn);
|
||||
PsiElement element = pointer.getElement();
|
||||
if (element != null) {
|
||||
((UndoRefactoringElementListener)elementListener).undoElementMovedOrRenamed(element, fqn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +182,6 @@ public abstract class ChangeSignatureProcessorBase extends BaseRefactoringProces
|
||||
}
|
||||
try {
|
||||
doChangeSignature(changeInfo, usages);
|
||||
final PsiElement method = changeInfo.getMethod();
|
||||
LOG.assertTrue(method.isValid());
|
||||
if (elementListener != null && changeInfo.isNameChanged()) {
|
||||
elementListener.elementRenamed(method);
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
|
||||
class MyExtensionImpl : MyExtension {
|
||||
object Util
|
||||
|
||||
<warning descr="Companion objects in IDE extension implementations may only contain a logger and constants">companion<caret></warning> object {
|
||||
// loggers are allowed
|
||||
|
||||
+4
-3
@@ -1,8 +1,9 @@
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
|
||||
class MyExtensionImpl : MyExtension {
|
||||
object Util
|
||||
|
||||
object Util {
|
||||
object Util1 {
|
||||
// test properties' moving
|
||||
val s
|
||||
get() = ""
|
||||
@@ -38,6 +39,6 @@ class MyExtensionImpl : MyExtension {
|
||||
|
||||
fun main() {
|
||||
// test references
|
||||
MyExtensionImpl.Util.foo()
|
||||
MyExtensionImpl.Util.a
|
||||
MyExtensionImpl.Util1.foo()
|
||||
MyExtensionImpl.Util1.a
|
||||
}
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// test outside references
|
||||
fun main() {
|
||||
MyExtensionImpl.Util.foo()
|
||||
MyExtensionImpl.Util.a
|
||||
MyExtensionImpl.Util1.foo()
|
||||
MyExtensionImpl.Util1.a
|
||||
}
|
||||
+7
-4
@@ -27,6 +27,7 @@ import org.jetbrains.kotlin.analysis.api.analyze
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.allowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtTypeNullability
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.idea.base.codeInsight.KotlinDeclarationNameValidator
|
||||
import org.jetbrains.kotlin.idea.base.codeInsight.KotlinNameSuggester
|
||||
import org.jetbrains.kotlin.idea.base.codeInsight.KotlinNameSuggestionProvider
|
||||
import org.jetbrains.kotlin.idea.base.fe10.codeInsight.newDeclaration.Fe10KotlinNewDeclarationNameValidator
|
||||
@@ -192,10 +193,12 @@ private class CreateObjectAndMoveProhibitedDeclarationsQuickFix(
|
||||
|
||||
private fun suggestNameForObjectInstance(companionObject: KtObjectDeclaration): String {
|
||||
val containingClass = companionObject.containingClass()!!
|
||||
return KotlinNameSuggester.suggestNameByName(
|
||||
DEFAULT_OBJECT_NAME,
|
||||
Fe10KotlinNewDeclarationNameValidator(containingClass, null, KotlinNameSuggestionProvider.ValidatorTarget.CLASS)
|
||||
)
|
||||
analyze(containingClass) {
|
||||
return KotlinNameSuggester.suggestNameByName(
|
||||
DEFAULT_OBJECT_NAME,
|
||||
Fe10KotlinNewDeclarationNameValidator(containingClass, null, KotlinNameSuggestionProvider.ValidatorTarget.CLASS)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun invokeRenameFix(project: Project, file: PsiFile, editor: Editor?, createdObject: KtObjectDeclaration) {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<orderEntry type="module" module-name="kotlin.refactorings.rename.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.code-insight.impl-base" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.code-insight.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.highlighting" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.highlighting.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.refactorings.tests.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.searching.test.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.base.util" scope="RUNTIME" />
|
||||
@@ -49,5 +49,6 @@
|
||||
<orderEntry type="module" module-name="kotlin.base.statistics" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.compiler-plugins.parcelize.tests" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.compiler-plugins.parcelize.tests.k2" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="kotlin.copyright.fir.tests" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -25,5 +25,7 @@
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-fe10" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.workspace.jps" />
|
||||
<orderEntry type="module" module-name="intellij.platform.backend.workspace" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide" />
|
||||
<orderEntry type="module" module-name="kotlin.base.facet" />
|
||||
</component>
|
||||
</module>
|
||||
+3
@@ -15,6 +15,9 @@
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinPackageProviderFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.analysisApiProviders.IdeKotlinPackageProviderFactory"/>
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinMessageBusProvider"
|
||||
serviceImplementation="org.jetbrains.kotlin.analysis.providers.impl.KotlinProjectMessageBusProvider"/>
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.PackagePartProviderFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.analysisApiProviders.PackagePartProviderFactoryIdeImpl"/>
|
||||
|
||||
+8
-3
@@ -5,7 +5,7 @@ import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtLibraryModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
|
||||
import org.jetbrains.kotlin.analysis.providers.KotlinAnchorModuleProvider
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.libraryToSourceAnalysis.ResolutionAnchorCacheService.Companion.getInstance
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.libraryToSourceAnalysis.ResolutionAnchorCacheService
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.LibraryInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
@@ -15,6 +15,11 @@ class IdeKotlinAnchorModuleProvider(val project: Project) : KotlinAnchorModulePr
|
||||
override fun getAnchorModule(libraryModule: KtLibraryModule): KtSourceModule? {
|
||||
@OptIn(Frontend10ApiUsage::class)
|
||||
val libraryInfo = libraryModule.moduleInfo as? LibraryInfo ?: return null
|
||||
return getInstance(project).resolutionAnchorsForLibraries[libraryInfo]?.toKtModule() as? KtSourceModule
|
||||
return ResolutionAnchorCacheService.getInstance(project).resolutionAnchorsForLibraries[libraryInfo]?.toKtModule() as? KtSourceModule
|
||||
}
|
||||
}
|
||||
|
||||
override fun getAllAnchorModules(): Collection<KtSourceModule> =
|
||||
ResolutionAnchorCacheService.getInstance(project)
|
||||
.librariesForResolutionAnchors.keys
|
||||
.mapNotNull { it.toKtModule() as? KtSourceModule }
|
||||
}
|
||||
|
||||
+324
@@ -0,0 +1,324 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.analysisApiProviders
|
||||
|
||||
import com.intellij.ide.plugins.DynamicPluginListener
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptor
|
||||
import com.intellij.java.workspace.entities.JavaSourceRootPropertiesEntity
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManagerListener
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.projectRoots.ProjectJdkTable
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.roots.LibraryOrderEntry
|
||||
import com.intellij.openapi.roots.ModuleRootEvent
|
||||
import com.intellij.openapi.roots.ModuleRootListener
|
||||
import com.intellij.openapi.roots.ProjectFileIndex
|
||||
import com.intellij.openapi.roots.ProjectRootManager
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.newvfs.BulkFileListener
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileMoveEvent
|
||||
import com.intellij.platform.workspace.jps.entities.ContentRootEntity
|
||||
import com.intellij.platform.workspace.jps.entities.FacetEntity
|
||||
import com.intellij.platform.workspace.jps.entities.LibraryEntity
|
||||
import com.intellij.platform.workspace.jps.entities.ModuleEntity
|
||||
import com.intellij.platform.workspace.jps.entities.SourceRootEntity
|
||||
import com.intellij.platform.workspace.storage.EntityChange
|
||||
import com.intellij.platform.workspace.storage.EntityStorage
|
||||
import com.intellij.platform.workspace.storage.VersionedStorageChange
|
||||
import com.intellij.platform.workspace.storage.WorkspaceEntity
|
||||
import com.intellij.util.io.URLUtil
|
||||
import com.intellij.workspaceModel.ide.impl.legacyBridge.library.findLibraryBridge
|
||||
import com.intellij.workspaceModel.ide.impl.legacyBridge.module.findModule
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.providers.KotlinGlobalModificationService
|
||||
import org.jetbrains.kotlin.analysis.providers.analysisMessageBus
|
||||
import org.jetbrains.kotlin.analysis.providers.topics.KotlinModuleStateModificationKind
|
||||
import org.jetbrains.kotlin.analysis.providers.topics.KotlinTopics
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.getBinaryAndSourceModuleInfos
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.IdeaModuleInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
import org.jetbrains.kotlin.idea.util.AbstractSingleFileModuleBeforeFileEventListener
|
||||
import org.jetbrains.kotlin.idea.util.toKtModulesForModificationEvents
|
||||
import org.jetbrains.kotlin.idea.facet.isKotlinFacet
|
||||
import org.jetbrains.kotlin.utils.alwaysTrue
|
||||
|
||||
open class KotlinModuleStateModificationService(val project: Project) : Disposable {
|
||||
protected open fun mayBuiltinsHaveChanged(events: List<VFileEvent>): Boolean { return false }
|
||||
|
||||
private fun invalidateSourceModule(
|
||||
module: Module,
|
||||
modificationKind: KotlinModuleStateModificationKind = KotlinModuleStateModificationKind.UPDATE,
|
||||
) {
|
||||
module.toKtModulesForModificationEvents().forEach { ktModule ->
|
||||
project.publishModuleStateModification(ktModule, modificationKind)
|
||||
}
|
||||
}
|
||||
|
||||
private fun invalidateLibraryModule(
|
||||
library: Library,
|
||||
modificationKind: KotlinModuleStateModificationKind = KotlinModuleStateModificationKind.UPDATE,
|
||||
) {
|
||||
invalidateByModuleInfos(library.getBinaryAndSourceModuleInfos(project), modificationKind)
|
||||
}
|
||||
|
||||
private fun invalidateByModuleInfos(moduleInfos: Iterable<IdeaModuleInfo>, modificationKind: KotlinModuleStateModificationKind) {
|
||||
moduleInfos.forEach { moduleInfo ->
|
||||
project.publishModuleStateModification(moduleInfo.toKtModule(), modificationKind)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes a module state modification event for a script or not-under-content-root [KtModule] whose file is being moved or deleted.
|
||||
*
|
||||
* This listener processes events *before* the file is moved/deleted due to the following reasons:
|
||||
*
|
||||
* 1. Move: The file may be moved outside the project's content root. The listener cannot react to such files.
|
||||
* 2. Deletion: Getting a PSI file (and in turn the PSI file's [KtModule]) for a virtual file which has been deleted is not feasible.
|
||||
*
|
||||
* A global out-of-block modification event will be published by `FirIdeOutOfBlockPsiTreeChangePreprocessor` when a Kotlin file is
|
||||
* moved, but we still need this listener to publish a module state modification event specifically.
|
||||
*/
|
||||
internal class SingleFileModuleModificationListener(private val project: Project) : AbstractSingleFileModuleBeforeFileEventListener(project) {
|
||||
override fun isRelevantEvent(event: VFileEvent, file: VirtualFile): Boolean = event is VFileMoveEvent || event is VFileDeleteEvent
|
||||
|
||||
override fun processEvent(event: VFileEvent, module: KtModule) {
|
||||
val modificationKind = when (event) {
|
||||
is VFileDeleteEvent -> KotlinModuleStateModificationKind.REMOVAL
|
||||
else -> KotlinModuleStateModificationKind.UPDATE
|
||||
}
|
||||
project.publishModuleStateModification(module, modificationKind)
|
||||
}
|
||||
}
|
||||
|
||||
internal class LibraryUpdatesListener(private val project: Project) : BulkFileListener {
|
||||
val index = ProjectRootManager.getInstance(project).fileIndex
|
||||
|
||||
private val moduleStateModificationService: KotlinModuleStateModificationService get() = getInstance(project)
|
||||
|
||||
override fun before(events: List<VFileEvent>) {
|
||||
if (moduleStateModificationService.mayBuiltinsHaveChanged(events)) {
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
return
|
||||
}
|
||||
|
||||
events.mapNotNull { event ->
|
||||
val file = when (event) {
|
||||
//for all other events workspace model should do the job
|
||||
is VFileContentChangeEvent -> event.file
|
||||
else -> return@mapNotNull null
|
||||
}
|
||||
if (!file.extension.equals("jar", ignoreCase = true)) return@mapNotNull null //react only on jars
|
||||
val jarRoot = StandardFileSystems.jar().findFileByPath(file.path + URLUtil.JAR_SEPARATOR) ?: return@mapNotNull null
|
||||
(index.getOrderEntriesForFile(jarRoot).firstOrNull { it is LibraryOrderEntry } as? LibraryOrderEntry)?.library
|
||||
}.distinct().forEach { moduleStateModificationService.invalidateLibraryModule(it) }
|
||||
}
|
||||
}
|
||||
|
||||
internal class JdkListener(private val project: Project) : ProjectJdkTable.Listener {
|
||||
override fun jdkRemoved(jdk: Sdk) {
|
||||
// Most modules will depend on an SDK, so its removal constitutes global module state modification. We cannot be more
|
||||
// fine-grained here because `KtSdkModules`s aren't supported by `IdeKotlinModuleDependentsProvider`, so invalidation based on
|
||||
// a module-level modification event may not work as expected with a `KtSdkModule`.
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
}
|
||||
}
|
||||
|
||||
internal class NonWorkspaceModuleRootListener(private val project: Project) : ModuleRootListener {
|
||||
override fun beforeRootsChange(event: ModuleRootEvent) {
|
||||
if (event.isCausedByWorkspaceModelChangesOnly) return
|
||||
|
||||
// The cases described in `isCausedByWorkspaceModelChangesOnly` are rare enough to publish global module state modification
|
||||
// events for simplicity. `NonWorkspaceModuleRootListener` can eventually be removed once the APIs described in
|
||||
// `isCausedByWorkspaceModelChangesOnly` are removed.
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
}
|
||||
}
|
||||
|
||||
internal class FileDocumentListener(private val project: Project) : FileDocumentManagerListener {
|
||||
override fun fileWithNoDocumentChanged(file: VirtualFile) {
|
||||
// `FileDocumentManagerListener` may receive events from other projects via `FileDocumentManagerImpl`'s `AsyncFileListener`.
|
||||
if (!ProjectFileIndex.getInstance(project).isInContent(file)) {
|
||||
return
|
||||
}
|
||||
|
||||
// Workspace model changes are already handled by `KotlinModuleStateModificationService`, so we shouldn't publish a module state
|
||||
// modification event when the `workspace.xml` is changed by the IDE.
|
||||
if (file == project.workspaceFile) {
|
||||
return
|
||||
}
|
||||
|
||||
// "No document" means no pomModel change. If the file's PSI was not loaded, then a modification event would be published via
|
||||
// the `PsiTreeChangeEvent.PROP_UNLOADED_PSI` event. If the PSI was loaded, then `FileManagerImpl.reloadPsiAfterTextChange` is
|
||||
// fired which doesn't provide any explicit changes, so we need to publish a global modification event because the file's
|
||||
// content may have been changed externally.
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
}
|
||||
}
|
||||
|
||||
internal class MyDynamicPluginListener(private val project: Project) : DynamicPluginListener {
|
||||
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) {
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
}
|
||||
|
||||
override fun pluginLoaded(pluginDescriptor: IdeaPluginDescriptor) {
|
||||
KotlinGlobalModificationService.getInstance(project).publishGlobalModuleStateModification()
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun beforeWorkspaceModelChanged(event: VersionedStorageChange) {
|
||||
handleLibraryChanges(event)
|
||||
|
||||
/**
|
||||
* We keep track of the already invalidated modules because we don't need [handleChangesInsideModule] to publish another
|
||||
* module state modification event for the same module.
|
||||
*/
|
||||
val alreadyInvalidatedModules = handleModuleChanges(event)
|
||||
handleChangesInsideModule(event, alreadyInvalidatedModules)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handel changes inside a module structure.
|
||||
* All such changes are treated as [UPDATE][KotlinModuleStateModificationKind.UPDATE]
|
||||
*
|
||||
* Some examples: changes in content roots, or in the module facet.
|
||||
*/
|
||||
private fun handleChangesInsideModule(event: VersionedStorageChange, alreadyInvalidatedModules: Set<Module>) {
|
||||
for (changedModule in event.getChangesInsideModules()) {
|
||||
if (changedModule in alreadyInvalidatedModules) continue
|
||||
invalidateSourceModule(changedModule)
|
||||
}
|
||||
}
|
||||
|
||||
private fun VersionedStorageChange.getChangesInsideModules(): Set<Module> = buildSet {
|
||||
contentRootChanges(this)
|
||||
facetChanges(this)
|
||||
}
|
||||
|
||||
private fun VersionedStorageChange.contentRootChanges(modules: MutableSet<Module>) {
|
||||
getChanges(ContentRootEntity::class.java).mapNotNullTo(modules) {
|
||||
getChangedModule(it.oldEntity, it.newEntity)
|
||||
}
|
||||
|
||||
getChanges(SourceRootEntity::class.java).mapNotNullTo(modules) {
|
||||
getChangedModule(it.oldEntity?.contentRoot, it.newEntity?.contentRoot)
|
||||
}
|
||||
|
||||
getChanges(JavaSourceRootPropertiesEntity::class.java).mapNotNullTo(modules) {
|
||||
getChangedModule(it.oldEntity?.sourceRoot?.contentRoot, it.newEntity?.sourceRoot?.contentRoot)
|
||||
}
|
||||
}
|
||||
|
||||
private fun VersionedStorageChange.getChangedModule(
|
||||
contentRootBefore: ContentRootEntity?,
|
||||
contentRootAfter: ContentRootEntity?
|
||||
): Module? = getChangedModule(
|
||||
contentRootBefore,
|
||||
contentRootAfter,
|
||||
moduleSelector = ContentRootEntity::module,
|
||||
)
|
||||
|
||||
private fun VersionedStorageChange.facetChanges(modules: MutableSet<Module>) {
|
||||
getChanges(FacetEntity::class.java).mapNotNullTo(modules) {
|
||||
getChangedModule(
|
||||
oldEntity = it.oldEntity,
|
||||
newEntity = it.newEntity,
|
||||
entityFilter = FacetEntity::isKotlinFacet,
|
||||
moduleSelector = FacetEntity::module,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun <T : WorkspaceEntity> VersionedStorageChange.getChangedModule(
|
||||
oldEntity: T?,
|
||||
newEntity: T?,
|
||||
entityFilter: (T) -> Boolean = alwaysTrue<T>(),
|
||||
moduleSelector: (T) -> ModuleEntity?,
|
||||
): Module? {
|
||||
val oldModule = oldEntity?.takeIf(entityFilter)?.let(moduleSelector)?.findModule(storageBefore)
|
||||
val newModule = newEntity?.takeIf(entityFilter)?.let(moduleSelector)?.findModule(storageAfter)
|
||||
if (newModule != null && oldModule != null) {
|
||||
check(oldModule == newModule) {
|
||||
"$oldModule should be equal to $newModule for ${EntityChange.Replaced::class.java}"
|
||||
}
|
||||
}
|
||||
|
||||
return oldModule ?: newModule
|
||||
}
|
||||
|
||||
private fun handleLibraryChanges(event: VersionedStorageChange) {
|
||||
val libraryEntities = event.getChanges(LibraryEntity::class.java).ifEmpty { return }
|
||||
for (change in libraryEntities) {
|
||||
when (change) {
|
||||
is EntityChange.Added -> {}
|
||||
is EntityChange.Removed -> {
|
||||
change.oldEntity
|
||||
.findLibraryBridge(event.storageBefore)
|
||||
?.let { invalidateLibraryModule(it, KotlinModuleStateModificationKind.REMOVAL) }
|
||||
}
|
||||
|
||||
is EntityChange.Replaced -> {
|
||||
val changedLibrary = change.getReplacedEntity(event, LibraryEntity::findLibraryBridge) ?: continue
|
||||
invalidateLibraryModule(changedLibrary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates removed and replaced [Module]s and returns the set of these invalidated modules.
|
||||
*/
|
||||
private fun handleModuleChanges(event: VersionedStorageChange): Set<Module> {
|
||||
val moduleEntities = event.getChanges(ModuleEntity::class.java).ifEmpty { return emptySet() }
|
||||
|
||||
return buildSet {
|
||||
for (change in moduleEntities) {
|
||||
when (change) {
|
||||
is EntityChange.Added -> {}
|
||||
is EntityChange.Removed -> {
|
||||
change.oldEntity.findModule(event.storageBefore)?.let { module ->
|
||||
invalidateSourceModule(module, KotlinModuleStateModificationKind.REMOVAL)
|
||||
add(module)
|
||||
}
|
||||
}
|
||||
|
||||
is EntityChange.Replaced -> {
|
||||
val changedModule = change.getReplacedEntity(event, ModuleEntity::findModule) ?: continue
|
||||
invalidateSourceModule(changedModule)
|
||||
add(changedModule)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun dispose() {}
|
||||
|
||||
companion object {
|
||||
fun getInstance(project: Project): KotlinModuleStateModificationService =
|
||||
project.getService(KotlinModuleStateModificationService::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
private fun <C : WorkspaceEntity, E> EntityChange.Replaced<C>.getReplacedEntity(
|
||||
event: VersionedStorageChange,
|
||||
get: (C, EntityStorage) -> E
|
||||
): E {
|
||||
val old = get(oldEntity, event.storageBefore)
|
||||
val new = get(newEntity, event.storageAfter)
|
||||
check(old == new) {
|
||||
"$old should be equal to $new for ${EntityChange.Replaced::class.java}"
|
||||
}
|
||||
return new
|
||||
}
|
||||
|
||||
private fun Project.publishModuleStateModification(module: KtModule, modificationKind: KotlinModuleStateModificationKind) {
|
||||
analysisMessageBus.syncPublisher(KotlinTopics.MODULE_STATE_MODIFICATION).onModification(module, modificationKind)
|
||||
}
|
||||
-278
@@ -1,278 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.analysisApiProviders
|
||||
|
||||
import com.intellij.java.workspace.entities.JavaSourceRootPropertiesEntity
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.projectRoots.ProjectJdkTable
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.roots.LibraryOrderEntry
|
||||
import com.intellij.openapi.roots.ProjectRootManager
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.openapi.vfs.newvfs.BulkFileListener
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileMoveEvent
|
||||
import com.intellij.platform.workspace.jps.entities.ContentRootEntity
|
||||
import com.intellij.platform.workspace.jps.entities.LibraryEntity
|
||||
import com.intellij.platform.workspace.jps.entities.ModuleEntity
|
||||
import com.intellij.platform.workspace.jps.entities.SourceRootEntity
|
||||
import com.intellij.util.io.URLUtil
|
||||
import com.intellij.platform.backend.workspace.WorkspaceModelChangeListener
|
||||
import com.intellij.platform.backend.workspace.WorkspaceModelTopics
|
||||
import com.intellij.workspaceModel.ide.impl.legacyBridge.library.findLibraryBridge
|
||||
import com.intellij.workspaceModel.ide.impl.legacyBridge.module.findModule
|
||||
import com.intellij.platform.workspace.storage.EntityChange
|
||||
import com.intellij.platform.workspace.storage.EntityStorage
|
||||
import com.intellij.platform.workspace.storage.VersionedStorageChange
|
||||
import com.intellij.platform.workspace.storage.WorkspaceEntity
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.analysis.project.structure.*
|
||||
import org.jetbrains.kotlin.analysis.providers.KtModuleStateTracker
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.LibraryInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.ModuleSourceInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.SdkInfo
|
||||
import org.jetbrains.kotlin.idea.base.util.Frontend10ApiUsage
|
||||
import org.jetbrains.kotlin.parsing.KotlinParserDefinition
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
@OptIn(Frontend10ApiUsage::class)
|
||||
open class KotlinModuleStateTrackerProvider(val project: Project) : Disposable {
|
||||
init {
|
||||
val busConnection = project.messageBus.connect(this)
|
||||
busConnection.subscribe(WorkspaceModelTopics.CHANGED, ModelChangeListener())
|
||||
busConnection.subscribe(ProjectJdkTable.JDK_TABLE_TOPIC, JdkListener())
|
||||
busConnection.subscribe(VirtualFileManager.VFS_CHANGES, ScriptFileListener())
|
||||
busConnection.subscribe(VirtualFileManager.VFS_CHANGES, LibraryUpdatesListener())
|
||||
}
|
||||
|
||||
private val builtinTracker = ModuleStateTrackerImpl()
|
||||
private val libraryCache = ConcurrentHashMap<Library, ModuleStateTrackerImpl>()
|
||||
private val sourceModuleCache = ConcurrentHashMap<Module, ModuleStateTrackerImpl>()
|
||||
private val sdkCache = ConcurrentHashMap<Sdk, ModuleStateTrackerImpl>()
|
||||
private val scriptCache = ConcurrentHashMap<VirtualFile, ModuleStateTrackerImpl>()
|
||||
|
||||
protected open fun shouldInvalidateBuiltinSession(events: List<VFileEvent>): Boolean { return false }
|
||||
|
||||
fun getModuleStateTrackerFor(module: KtModule): KtModuleStateTracker {
|
||||
return when (module) {
|
||||
is KtScriptDependencyModule -> ModuleStateTrackerImpl()
|
||||
|
||||
is KtLibraryModule -> {
|
||||
val libraryInfo = module.moduleInfo as LibraryInfo
|
||||
libraryInfo.checkValidity()
|
||||
return libraryCache.computeIfAbsent(libraryInfo.library) { ModuleStateTrackerImpl() }
|
||||
}
|
||||
|
||||
is KtSdkModule -> {
|
||||
val sdkInfo = module.moduleInfo as SdkInfo
|
||||
sdkInfo.checkValidity()
|
||||
val sdk = sdkInfo.sdk
|
||||
return sdkCache.computeIfAbsent(sdk) { ModuleStateTrackerImpl() }
|
||||
}
|
||||
|
||||
is KtSourceModule -> {
|
||||
val sourceModule = module.moduleInfo as ModuleSourceInfo
|
||||
sourceModule.checkValidity()
|
||||
return sourceModuleCache.computeIfAbsent(sourceModule.module) { ModuleStateTrackerImpl() }
|
||||
}
|
||||
|
||||
is KtLibrarySourceModule -> getModuleStateTrackerFor(module.binaryLibrary)
|
||||
|
||||
is KtBuiltinsModule -> builtinTracker
|
||||
|
||||
is KtScriptModule -> {
|
||||
val virtualFile = module.file.virtualFile ?: error("Script ${module.file} does not have a backing 'VirtualFile'")
|
||||
scriptCache.computeIfAbsent(virtualFile) { ModuleStateTrackerImpl() }
|
||||
}
|
||||
|
||||
is KtNotUnderContentRootModule -> ModuleStateTrackerImpl() // TODO need proper cache?
|
||||
}
|
||||
}
|
||||
|
||||
private inner class ScriptFileListener : BulkFileListener {
|
||||
override fun after(events: List<VFileEvent>) {
|
||||
for (event in events) {
|
||||
val file = when (event) {
|
||||
is VFileDeleteEvent -> event.file
|
||||
is VFileMoveEvent -> event.file
|
||||
else -> continue
|
||||
}
|
||||
|
||||
if (file.extension == KotlinParserDefinition.STD_SCRIPT_SUFFIX) {
|
||||
scriptCache.remove(file)?.invalidate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private inner class LibraryUpdatesListener : BulkFileListener {
|
||||
val index = ProjectRootManager.getInstance(project).fileIndex
|
||||
override fun after(events: List<VFileEvent>) {
|
||||
if (shouldInvalidateBuiltinSession(events)) {
|
||||
builtinTracker.incModificationCount()
|
||||
libraryCache.values.forEach { it.incModificationCount() }
|
||||
sourceModuleCache.values.forEach { it.incModificationCount() }
|
||||
sdkCache.values.forEach { it.incModificationCount() }
|
||||
scriptCache.values.forEach { it.incModificationCount() }
|
||||
return
|
||||
}
|
||||
events.mapNotNull { event ->
|
||||
val file = when (event) {
|
||||
//for all other events workspace model should do the job
|
||||
is VFileContentChangeEvent -> event.file
|
||||
else -> return@mapNotNull null
|
||||
}
|
||||
if (file.extension != "jar") return@mapNotNull null //react only on jars
|
||||
val jarRoot = StandardFileSystems.jar().findFileByPath(file.path + URLUtil.JAR_SEPARATOR) ?: return@mapNotNull null
|
||||
(index.getOrderEntriesForFile(jarRoot).firstOrNull { it is LibraryOrderEntry } as? LibraryOrderEntry)?.library
|
||||
}.distinct().forEach {
|
||||
libraryCache[it]?.incModificationCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private inner class JdkListener : ProjectJdkTable.Listener {
|
||||
override fun jdkRemoved(jdk: Sdk) {
|
||||
sdkCache.remove(jdk)?.invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
private inner class ModelChangeListener : WorkspaceModelChangeListener {
|
||||
override fun beforeChanged(event: VersionedStorageChange) {
|
||||
handleLibraryChanges(event)
|
||||
handleModuleChanges(event)
|
||||
handleContentRootInModuleChanges(event)
|
||||
}
|
||||
|
||||
private fun handleContentRootInModuleChanges(event: VersionedStorageChange) {
|
||||
for (changedModule in event.getChangedModules()) {
|
||||
sourceModuleCache[changedModule]?.incModificationCount()
|
||||
}
|
||||
}
|
||||
|
||||
private fun VersionedStorageChange.getChangedModules(): Set<Module> = buildSet {
|
||||
getChanges(ContentRootEntity::class.java).mapNotNullTo(this) {
|
||||
getChangedModule(it.oldEntity, it.newEntity)
|
||||
}
|
||||
|
||||
getChanges(SourceRootEntity::class.java).mapNotNullTo(this) {
|
||||
getChangedModule(it.oldEntity?.contentRoot, it.newEntity?.contentRoot)
|
||||
}
|
||||
|
||||
getChanges(JavaSourceRootPropertiesEntity::class.java).mapNotNullTo(this) {
|
||||
getChangedModule(it.oldEntity?.sourceRoot?.contentRoot, it.newEntity?.sourceRoot?.contentRoot)
|
||||
}
|
||||
}
|
||||
|
||||
private fun VersionedStorageChange.getChangedModule(
|
||||
contentRootBefore: ContentRootEntity?,
|
||||
contentRootAfter: ContentRootEntity?
|
||||
): Module? {
|
||||
val oldModule = contentRootBefore?.module?.findModule(storageBefore)
|
||||
val newModule = contentRootAfter?.module?.findModule(storageAfter)
|
||||
if (newModule != null && oldModule != null) {
|
||||
check(oldModule == newModule) {
|
||||
"$oldModule should be equal to $newModule for ${EntityChange.Replaced::class.java}"
|
||||
}
|
||||
}
|
||||
return oldModule ?: newModule
|
||||
}
|
||||
|
||||
private fun handleLibraryChanges(event: VersionedStorageChange) {
|
||||
val libraryEntities = event.getChanges(LibraryEntity::class.java).ifEmpty { return }
|
||||
for (change in libraryEntities) {
|
||||
when (change) {
|
||||
is EntityChange.Added -> {}
|
||||
is EntityChange.Removed -> {
|
||||
change.oldEntity.findLibraryBridge(event.storageBefore)?.let { library ->
|
||||
libraryCache.remove(library)?.invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
is EntityChange.Replaced -> {
|
||||
val changedLibrary = change.getReplacedEntity(event, LibraryEntity::findLibraryBridge) ?: continue
|
||||
libraryCache[changedLibrary]?.incModificationCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleModuleChanges(event: VersionedStorageChange) {
|
||||
val moduleEntities = event.getChanges(ModuleEntity::class.java).ifEmpty { return }
|
||||
for (change in moduleEntities) {
|
||||
when (change) {
|
||||
is EntityChange.Added -> {}
|
||||
is EntityChange.Removed -> {
|
||||
change.oldEntity.findModule(event.storageBefore)?.let { module ->
|
||||
sourceModuleCache.remove(module)?.invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
is EntityChange.Replaced -> {
|
||||
val changedModule = change.getReplacedEntity(event, ModuleEntity::findModule) ?: continue
|
||||
sourceModuleCache[changedModule]?.incModificationCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun <C : WorkspaceEntity, E> EntityChange.Replaced<C>.getReplacedEntity(
|
||||
event: VersionedStorageChange,
|
||||
get: (C, EntityStorage) -> E
|
||||
): E {
|
||||
val old = get(oldEntity, event.storageBefore)
|
||||
val new = get(newEntity, event.storageAfter)
|
||||
check(old == new) {
|
||||
"$old should be equal to $new for ${EntityChange.Replaced::class.java}"
|
||||
}
|
||||
return new
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
fun incrementModificationCountForAllModules(includeBinaryModules: Boolean) {
|
||||
sourceModuleCache.forEach { _, tracker -> tracker.incModificationCount() }
|
||||
if (includeBinaryModules) {
|
||||
libraryCache.forEach { _, tracker -> tracker.incModificationCount() }
|
||||
sdkCache.forEach { _, tracker -> tracker.incModificationCount() }
|
||||
}
|
||||
}
|
||||
|
||||
override fun dispose() {}
|
||||
|
||||
companion object {
|
||||
fun getInstance(project: Project): KotlinModuleStateTrackerProvider =
|
||||
project.getService(KotlinModuleStateTrackerProvider::class.java)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ModuleStateTrackerImpl : KtModuleStateTracker {
|
||||
private val modificationCount = AtomicLong()
|
||||
|
||||
@Volatile
|
||||
override var isValid: Boolean = true
|
||||
private set
|
||||
|
||||
fun incModificationCount() {
|
||||
if (isValid) {
|
||||
modificationCount.incrementAndGet()
|
||||
}
|
||||
}
|
||||
|
||||
fun invalidate() {
|
||||
incModificationCount()
|
||||
isValid = false
|
||||
}
|
||||
|
||||
override val rootModificationCount: Long
|
||||
get() = modificationCount.get()
|
||||
}
|
||||
@@ -36,5 +36,7 @@
|
||||
<orderEntry type="module" module-name="intellij.java.indexing.impl" />
|
||||
<orderEntry type="module" module-name="kotlin.base.psi" />
|
||||
<orderEntry type="library" name="kotlinc.analysis-project-structure" level="project" />
|
||||
<orderEntry type="module" module-name="kotlin.formatter" />
|
||||
<orderEntry type="module" module-name="intellij.platform.codeStyle" />
|
||||
</component>
|
||||
</module>
|
||||
+47
-49
@@ -10,11 +10,7 @@ import com.intellij.psi.search.PsiShortNamesCache
|
||||
import com.intellij.util.SmartList
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.analyze
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtCallableSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtClassOrObjectSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtNamedClassOrObjectSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.getSymbolOfTypeSafe
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.receiverType
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.*
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtNonErrorClassType
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtType
|
||||
import org.jetbrains.kotlin.analysis.api.types.KtTypeNullability
|
||||
@@ -22,56 +18,58 @@ import org.jetbrains.kotlin.idea.base.psi.isExpectDeclaration
|
||||
import org.jetbrains.kotlin.idea.stubindex.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.platform.isCommon
|
||||
import org.jetbrains.kotlin.psi.KtCallableDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.utils.yieldIfNotNull
|
||||
|
||||
class KtSymbolFromIndexProvider private constructor(private val project: Project, private val scope: GlobalSearchScope) {
|
||||
context(KtAnalysisSession)
|
||||
fun getKotlinClassesByName(
|
||||
name: Name,
|
||||
psiFilter: (KtClassOrObject) -> Boolean = { true },
|
||||
): Sequence<KtNamedClassOrObjectSymbol> {
|
||||
psiFilter: (KtClassLikeDeclaration) -> Boolean = { true },
|
||||
): Sequence<KtClassLikeSymbol> {
|
||||
val isCommon = useSiteModule.platform.isCommon()
|
||||
val values = KotlinClassShortNameIndex.getAllElements(
|
||||
name.asString(),
|
||||
project,
|
||||
scope
|
||||
) {
|
||||
(isCommon || !it.isExpectDeclaration()) && psiFilter(it)
|
||||
}
|
||||
return sequence {
|
||||
for (value in values) {
|
||||
value.getNamedClassOrObjectSymbol()?.let { yield(it) }
|
||||
}
|
||||
yieldAll(
|
||||
getResolveExtensionScopeWithTopLevelDeclarations().getClassifierSymbols(name).filterIsInstance<KtNamedClassOrObjectSymbol>()
|
||||
)
|
||||
}
|
||||
|
||||
val valueFilter: (KtClassLikeDeclaration) -> Boolean = { (isCommon || !it.isExpectDeclaration()) && psiFilter(it) }
|
||||
val resolveExtensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
|
||||
return getClassLikeSymbols(
|
||||
classDeclarations = KotlinClassShortNameIndex.getAllElements(name.asString(), project, scope, valueFilter),
|
||||
typeAliasDeclarations = KotlinTypeAliasShortNameIndex.getAllElements(name.asString(), project, scope, valueFilter),
|
||||
declarationsFromExtension = resolveExtensionScope.getClassifierSymbols(name).filterIsInstance<KtClassLikeSymbol>(),
|
||||
)
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
fun getKotlinClassesByNameFilter(
|
||||
nameFilter: (Name) -> Boolean,
|
||||
psiFilter: (KtClassOrObject) -> Boolean = { true },
|
||||
): Sequence<KtNamedClassOrObjectSymbol> {
|
||||
psiFilter: (KtClassLikeDeclaration) -> Boolean = { true },
|
||||
): Sequence<KtClassLikeSymbol> {
|
||||
val isCommon = useSiteModule.platform.isCommon()
|
||||
val values = KotlinFullClassNameIndex.getAllElements(
|
||||
project,
|
||||
scope,
|
||||
keyFilter = { nameFilter(getShortName(it)) },
|
||||
valueFilter = { (isCommon || !it.isExpectDeclaration()) && psiFilter(it) }
|
||||
|
||||
val keyFilter: (String) -> Boolean = { nameFilter(getShortName(it)) }
|
||||
val valueFilter: (KtClassLikeDeclaration) -> Boolean = { (isCommon || !it.isExpectDeclaration()) && psiFilter(it) }
|
||||
val resolveExtensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
|
||||
return getClassLikeSymbols(
|
||||
classDeclarations = KotlinFullClassNameIndex.getAllElements(project, scope, keyFilter, valueFilter),
|
||||
typeAliasDeclarations = KotlinTypeAliasShortNameIndex.getAllElements(project, scope, keyFilter, valueFilter),
|
||||
declarationsFromExtension = resolveExtensionScope.getClassifierSymbols(nameFilter).filterIsInstance<KtClassLikeSymbol>(),
|
||||
)
|
||||
return sequence {
|
||||
for (ktClassOrObject in values) {
|
||||
ktClassOrObject.getNamedClassOrObjectSymbol()?.let { yield(it) }
|
||||
}
|
||||
yieldAll(
|
||||
getResolveExtensionScopeWithTopLevelDeclarations().getClassifierSymbols(nameFilter).filterIsInstance<KtNamedClassOrObjectSymbol>()
|
||||
)
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
private fun getClassLikeSymbols(
|
||||
classDeclarations: List<KtClassOrObject>,
|
||||
typeAliasDeclarations: List<KtTypeAlias>,
|
||||
declarationsFromExtension: Sequence<KtClassLikeSymbol>
|
||||
): Sequence<KtClassLikeSymbol> = sequence {
|
||||
for (ktClassOrObject in classDeclarations) {
|
||||
yieldIfNotNull(ktClassOrObject.getNamedClassOrObjectSymbol())
|
||||
}
|
||||
for (typeAlias in typeAliasDeclarations) {
|
||||
yield(typeAlias.getTypeAliasSymbol())
|
||||
}
|
||||
yieldAll(declarationsFromExtension)
|
||||
}
|
||||
|
||||
context(KtAnalysisSession)
|
||||
@@ -130,7 +128,7 @@ class KtSymbolFromIndexProvider private constructor(private val project: Project
|
||||
|
||||
return sequence {
|
||||
for (callableDeclaration in values) {
|
||||
callableDeclaration.getSymbolOfTypeSafe<KtCallableSymbol>()?.let { yield(it) }
|
||||
yieldIfNotNull(callableDeclaration.getSymbolOfTypeSafe<KtCallableSymbol>())
|
||||
}
|
||||
yieldAll(
|
||||
getResolveExtensionScopeWithTopLevelDeclarations().getCallableSymbols(name)
|
||||
@@ -174,7 +172,7 @@ class KtSymbolFromIndexProvider private constructor(private val project: Project
|
||||
|
||||
return sequence {
|
||||
for (callableDeclaration in values) {
|
||||
callableDeclaration.getSymbolOfTypeSafe<KtCallableSymbol>()?.let { yield(it) }
|
||||
yieldIfNotNull(callableDeclaration.getSymbolOfTypeSafe<KtCallableSymbol>())
|
||||
}
|
||||
yieldAll(
|
||||
getResolveExtensionScopeWithTopLevelDeclarations().getCallableSymbols(nameFilter).filter { !it.isExtension }
|
||||
@@ -197,10 +195,10 @@ class KtSymbolFromIndexProvider private constructor(private val project: Project
|
||||
|
||||
return sequence {
|
||||
for (extension in values) {
|
||||
extension.getSymbolOfTypeSafe<KtCallableSymbol>()?.let { yield(it) }
|
||||
yieldIfNotNull(extension.getSymbolOfTypeSafe<KtCallableSymbol>())
|
||||
}
|
||||
val extensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
yieldAll(extensionScope.getCallableSymbols(name).filterExtensionsByReceiverTypes(receiverTypes))
|
||||
val resolveExtensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
yieldAll(resolveExtensionScope.getCallableSymbols(name).filterExtensionsByReceiverTypes(receiverTypes))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,10 +221,10 @@ class KtSymbolFromIndexProvider private constructor(private val project: Project
|
||||
|
||||
return sequence {
|
||||
for (extension in values) {
|
||||
extension.getSymbolOfTypeSafe<KtCallableSymbol>()?.let { yield(it) }
|
||||
yieldIfNotNull(extension.getSymbolOfTypeSafe<KtCallableSymbol>())
|
||||
}
|
||||
val extensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
yieldAll(extensionScope.getCallableSymbols(nameFilter).filterExtensionsByReceiverTypes(receiverTypes))
|
||||
val resolveExtensionScope = getResolveExtensionScopeWithTopLevelDeclarations()
|
||||
yieldAll(resolveExtensionScope.getCallableSymbols(nameFilter).filterExtensionsByReceiverTypes(receiverTypes))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.analysis.api.utils
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.runReadAction
|
||||
import com.intellij.openapi.progress.ProgressIndicator
|
||||
import com.intellij.openapi.progress.Task
|
||||
import com.intellij.openapi.util.NlsContexts.DialogTitle
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.analyze
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
|
||||
/**
|
||||
* Show a modal window with a progress bar and specified [windowTitle]
|
||||
* and execute given [action] task with [KtAnalysisSession] context
|
||||
* If [action] throws some exception, then [analyzeInModalWindow] will rethrow it
|
||||
* Should be executed from EDT only
|
||||
* If you want to analyse something from non-EDT thread, consider using [analyze]
|
||||
*/
|
||||
inline fun <R> analyzeInModalWindow(
|
||||
contextElement: KtElement,
|
||||
@DialogTitle windowTitle: String,
|
||||
crossinline action: KtAnalysisSession.() -> R
|
||||
): R {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread()
|
||||
val task = object : Task.WithResult<R, Exception>(contextElement.project, windowTitle, /*canBeCancelled*/ true) {
|
||||
override fun compute(indicator: ProgressIndicator): R =
|
||||
runReadAction { analyze(contextElement, action) }
|
||||
}
|
||||
task.queue()
|
||||
return task.result
|
||||
}
|
||||
+1
-44
@@ -3,19 +3,16 @@
|
||||
package org.jetbrains.kotlin.idea.base.analysis
|
||||
|
||||
import com.intellij.ProjectTopics
|
||||
import com.intellij.java.library.JavaLibraryModificationTracker
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.application.runReadAction
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.module.ModuleManager
|
||||
import com.intellij.openapi.progress.ProgressManager.checkCanceled
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.projectRoots.ProjectJdkTable
|
||||
import com.intellij.openapi.projectRoots.Sdk
|
||||
import com.intellij.openapi.roots.*
|
||||
import com.intellij.openapi.roots.impl.libraries.LibraryEx
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.platform.backend.workspace.WorkspaceModelChangeListener
|
||||
import com.intellij.platform.backend.workspace.WorkspaceModelTopics
|
||||
@@ -29,7 +26,6 @@ import com.intellij.util.concurrency.annotations.RequiresReadLock
|
||||
import com.intellij.util.containers.MultiMap
|
||||
import com.intellij.workspaceModel.ide.impl.legacyBridge.module.findModule
|
||||
import org.jetbrains.kotlin.idea.base.analysis.libraries.LibraryDependencyCandidate
|
||||
import org.jetbrains.kotlin.idea.base.facet.isHMPPEnabled
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.*
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryDependenciesCache.LibraryDependencies
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.LibraryInfo
|
||||
@@ -39,7 +35,6 @@ import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.checkValidity
|
||||
import org.jetbrains.kotlin.idea.base.util.caching.ModuleEntityChangeListener
|
||||
import org.jetbrains.kotlin.idea.base.util.caching.SynchronizedFineGrainedEntityCache
|
||||
import org.jetbrains.kotlin.idea.caches.project.*
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.ModuleModificationTracker
|
||||
import org.jetbrains.kotlin.idea.configuration.isMavenized
|
||||
import org.jetbrains.kotlin.platform.jvm.isJvm
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||
@@ -161,8 +156,7 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend
|
||||
private fun computeLibrariesAndSdksUsedWithNoFilter(libraryInfo: LibraryInfo): LibraryDependencyCandidatesAndSdkInfos {
|
||||
val libraryDependencyCandidatesAndSdkInfos = LibraryDependencyCandidatesAndSdkInfosBuilder()
|
||||
|
||||
val modulesLibraryIsUsedIn =
|
||||
getLibraryUsageIndex().getModulesLibraryIsUsedIn(libraryInfo)
|
||||
val modulesLibraryIsUsedIn = project.service<LibraryUsageIndex>().getDependentModules(libraryInfo)
|
||||
|
||||
for (module in modulesLibraryIsUsedIn) {
|
||||
checkCanceled()
|
||||
@@ -200,15 +194,6 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend
|
||||
}
|
||||
}
|
||||
|
||||
private fun getLibraryUsageIndex(): LibraryUsageIndex =
|
||||
CachedValuesManager.getManager(project).getCachedValue(project) {
|
||||
CachedValueProvider.Result(
|
||||
LibraryUsageIndex(),
|
||||
ModuleModificationTracker.getInstance(project),
|
||||
JavaLibraryModificationTracker.getInstance(project)
|
||||
)
|
||||
}!!
|
||||
|
||||
private inner class LibraryDependenciesInnerCache :
|
||||
SynchronizedFineGrainedEntityCache<LibraryInfo, LibraryDependencies>(project, doSelfInitialization = false, cleanOnLowMemory = true),
|
||||
LibraryInfoListener,
|
||||
@@ -543,32 +528,4 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private inner class LibraryUsageIndex {
|
||||
private val modulesLibraryIsUsedIn: MultiMap<Library, Module> = runReadAction {
|
||||
val map: MultiMap<Library, Module> = MultiMap.createSet()
|
||||
val libraryCache = LibraryInfoCache.getInstance(project)
|
||||
for (module in ModuleManager.getInstance(project).modules) {
|
||||
checkCanceled()
|
||||
for (entry in ModuleRootManager.getInstance(module).orderEntries) {
|
||||
if (entry !is LibraryOrderEntry) continue
|
||||
val library = entry.library ?: continue
|
||||
val keyLibrary = libraryCache.deduplicatedLibrary(library)
|
||||
map.putValue(keyLibrary, module)
|
||||
}
|
||||
}
|
||||
|
||||
map
|
||||
}
|
||||
|
||||
fun getModulesLibraryIsUsedIn(libraryInfo: LibraryInfo) = sequence<Module> {
|
||||
val ideaModelInfosCache = getIdeaModelInfosCache(project)
|
||||
for (module in modulesLibraryIsUsedIn[libraryInfo.library]) {
|
||||
val mappedModuleInfos = ideaModelInfosCache.getModuleInfosForModule(module)
|
||||
if (mappedModuleInfos.any { it.platform.canDependOn(libraryInfo, module.isHMPPEnabled) }) {
|
||||
yield(module)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.analysis.libraries
|
||||
|
||||
import com.intellij.java.library.JavaLibraryModificationTracker
|
||||
import com.intellij.openapi.application.runReadAction
|
||||
import com.intellij.openapi.module.ModuleManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.roots.LibraryOrderEntry
|
||||
import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.psi.util.CachedValue
|
||||
import com.intellij.psi.util.CachedValueProvider
|
||||
import org.jetbrains.kotlin.idea.base.facet.isHMPPEnabled
|
||||
import com.intellij.psi.util.CachedValuesManager
|
||||
import com.intellij.util.containers.MultiMap
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryInfoCache
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryUsageIndex
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.LibraryInfo
|
||||
import org.jetbrains.kotlin.idea.caches.project.canDependOn
|
||||
import org.jetbrains.kotlin.idea.caches.project.getIdeaModelInfosCache
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.ModuleModificationTracker
|
||||
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus.checkCanceled
|
||||
|
||||
class LibraryUsageIndexImpl(private val project: Project) : LibraryUsageIndex {
|
||||
private val moduleDependentsByLibrary: CachedValue<MultiMap<Library, Module>> =
|
||||
CachedValuesManager.getManager(project).createCachedValue {
|
||||
CachedValueProvider.Result(
|
||||
computeLibraryModuleDependents(),
|
||||
ModuleModificationTracker.getInstance(project),
|
||||
JavaLibraryModificationTracker.getInstance(project),
|
||||
)
|
||||
}
|
||||
|
||||
override fun getDependentModules(libraryInfo: LibraryInfo): Sequence<Module> = sequence<Module> {
|
||||
val ideaModelInfosCache = getIdeaModelInfosCache(project)
|
||||
for (module in moduleDependentsByLibrary.value[libraryInfo.library]) {
|
||||
val mappedModuleInfos = ideaModelInfosCache.getModuleInfosForModule(module)
|
||||
if (mappedModuleInfos.any { it.platform.canDependOn(libraryInfo, module.isHMPPEnabled) }) {
|
||||
yield(module)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun computeLibraryModuleDependents(): MultiMap<Library, Module> = runReadAction {
|
||||
val moduleDependentsByLibrary = MultiMap.createSet<Library, Module>()
|
||||
val libraryCache = LibraryInfoCache.getInstance(project)
|
||||
for (module in ModuleManager.getInstance(project).modules) {
|
||||
checkCanceled()
|
||||
for (entry in ModuleRootManager.getInstance(module).orderEntries) {
|
||||
if (entry !is LibraryOrderEntry) continue
|
||||
val library = entry.library ?: continue
|
||||
val keyLibrary = libraryCache.deduplicatedLibrary(library)
|
||||
moduleDependentsByLibrary.putValue(keyLibrary, module)
|
||||
}
|
||||
}
|
||||
|
||||
moduleDependentsByLibrary
|
||||
}
|
||||
}
|
||||
+29
-33
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.idea.base.projectStructure.LibraryDependenciesCache
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.libraryToSourceAnalysis.ResolutionAnchorCacheService
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.LibraryInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo.ModuleSourceInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.util.getTransitiveLibraryDependencyInfos
|
||||
import org.jetbrains.kotlin.idea.caches.project.getModuleInfosFromIdeaModel
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.ModuleModificationTracker
|
||||
import org.jetbrains.kotlin.progress.ProgressIndicatorAndCompilationCanceledStatus.checkCanceled
|
||||
@@ -46,16 +47,27 @@ class ResolutionAnchorCacheServiceImpl(
|
||||
myState = State(mapping)
|
||||
}
|
||||
|
||||
override val resolutionAnchorsForLibraries: Map<LibraryInfo, ModuleSourceInfo>
|
||||
private class AnchorMapping(
|
||||
val anchorByLibrary: Map<LibraryInfo, ModuleSourceInfo>,
|
||||
val librariesByAnchor: Map<ModuleSourceInfo, List<LibraryInfo>>,
|
||||
)
|
||||
|
||||
private val anchorMapping: AnchorMapping
|
||||
get() =
|
||||
CachedValuesManager.getManager(project).getCachedValue(project) {
|
||||
CachedValueProvider.Result.create(
|
||||
mapResolutionAnchorForLibraries(),
|
||||
ModuleModificationTracker.getInstance(project),
|
||||
JavaLibraryModificationTracker.getInstance(project)
|
||||
createResolutionAnchorMapping(),
|
||||
ModuleModificationTracker.getInstance(project),
|
||||
JavaLibraryModificationTracker.getInstance(project)
|
||||
)
|
||||
}
|
||||
|
||||
override val resolutionAnchorsForLibraries: Map<LibraryInfo, ModuleSourceInfo>
|
||||
get() = anchorMapping.anchorByLibrary
|
||||
|
||||
override val librariesForResolutionAnchors: Map<ModuleSourceInfo, List<LibraryInfo>>
|
||||
get() = anchorMapping.librariesByAnchor
|
||||
|
||||
private val resolutionAnchorDependenciesCache: MutableMap<LibraryInfo, Set<ModuleSourceInfo>>
|
||||
get() =
|
||||
CachedValuesManager.getManager(project).getCachedValue(project) {
|
||||
@@ -71,13 +83,7 @@ class ResolutionAnchorCacheServiceImpl(
|
||||
return it
|
||||
}
|
||||
|
||||
val allTransitiveLibraryDependencies = with(LibraryDependenciesCache.getInstance(project)) {
|
||||
val directDependenciesOnLibraries = getLibraryDependencies(libraryInfo).libraries
|
||||
directDependenciesOnLibraries.closure { libraryDependency ->
|
||||
checkCanceled()
|
||||
getLibraryDependencies(libraryDependency).libraries
|
||||
}
|
||||
}
|
||||
val allTransitiveLibraryDependencies = LibraryDependenciesCache.getInstance(project).getTransitiveLibraryDependencyInfos(libraryInfo)
|
||||
|
||||
val dependencyResolutionAnchors = allTransitiveLibraryDependencies.mapNotNullTo(mutableSetOf()) { resolutionAnchorsForLibraries[it] }
|
||||
resolutionAnchorDependenciesCache.putIfAbsent(libraryInfo, dependencyResolutionAnchors)?.let {
|
||||
@@ -106,41 +112,31 @@ class ResolutionAnchorCacheServiceImpl(
|
||||
}
|
||||
}
|
||||
|
||||
private fun mapResolutionAnchorForLibraries(): Map<LibraryInfo, ModuleSourceInfo> {
|
||||
private fun createResolutionAnchorMapping(): AnchorMapping {
|
||||
val modulesByNames: Map<String, ModuleInfo> = associateModulesByNames()
|
||||
|
||||
return myState.moduleNameToAnchorName.entries.mapNotNull { (libraryName, anchorName) ->
|
||||
val anchorByLibrary = mutableMapOf<LibraryInfo, ModuleSourceInfo>()
|
||||
val librariesByAnchor = mutableMapOf<ModuleSourceInfo, MutableList<LibraryInfo>>()
|
||||
|
||||
myState.moduleNameToAnchorName.entries.forEach { (libraryName, anchorName) ->
|
||||
val library: LibraryInfo = modulesByNames[libraryName]?.safeAs<LibraryInfo>() ?: run {
|
||||
logger.warn("Resolution anchor mapping key doesn't point to a known library: $libraryName. Skipping this anchor")
|
||||
return@mapNotNull null
|
||||
return@forEach
|
||||
}
|
||||
|
||||
val anchor: ModuleSourceInfo = modulesByNames[anchorName]?.safeAs<ModuleSourceInfo>() ?: run {
|
||||
logger.warn("Resolution anchor mapping value doesn't point to a source module: $anchorName. Skipping this anchor")
|
||||
return@mapNotNull null
|
||||
return@forEach
|
||||
}
|
||||
|
||||
library to anchor
|
||||
}.toMap()
|
||||
anchorByLibrary.put(library, anchor)
|
||||
librariesByAnchor.getOrPut(anchor) { mutableListOf() }.add(library)
|
||||
}
|
||||
|
||||
return AnchorMapping(anchorByLibrary, librariesByAnchor)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val logger = logger<ResolutionAnchorCacheServiceImpl>()
|
||||
}
|
||||
}
|
||||
fun <T> Collection<T>.closure(f: (T) -> Collection<T>): Collection<T> {
|
||||
if (isEmpty()) return this
|
||||
|
||||
val result = HashSet(this)
|
||||
var elementsToCheck = result
|
||||
var oldSize = 0
|
||||
while (result.size > oldSize) {
|
||||
oldSize = result.size
|
||||
val toAdd = hashSetOf<T>()
|
||||
elementsToCheck.forEach { toAdd.addAll(f(it)) }
|
||||
result.addAll(toAdd)
|
||||
elementsToCheck = toAdd
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.SearchUtils.is
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.SearchUtils.isInvokeOfCompanionObject
|
||||
import org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport.SearchUtils.isUsageInContainingDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtDestructuringDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtFunction
|
||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||
|
||||
class KotlinRequestResultProcessor(
|
||||
@@ -61,7 +62,7 @@ class KotlinRequestResultProcessor(
|
||||
if (options.acceptCallableOverrides && isCallableOverrideUsage(originalElement)) {
|
||||
return true
|
||||
}
|
||||
if (options.acceptOverloads && isUsageInContainingDeclaration(originalElement)) {
|
||||
if (options.acceptOverloads && originalElement is KtFunction && isUsageInContainingDeclaration(originalElement)) {
|
||||
return true
|
||||
}
|
||||
if (options.acceptExtensionsOfDeclarationClass && isExtensionOfDeclarationClassUsage(originalElement)) {
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.util
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.roots.ProjectFileIndex
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.openapi.vfs.newvfs.BulkFileListener
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtNotUnderContentRootModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtScriptDependencyModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtScriptModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.ProjectStructureProvider
|
||||
import org.jetbrains.kotlin.idea.core.util.toPsiFile
|
||||
import org.jetbrains.kotlin.parsing.KotlinParserDefinition
|
||||
|
||||
/**
|
||||
* [AbstractSingleFileModuleFileEventListener] listens to file events and calls [processEvent] with the single-file [KtModule] associated
|
||||
* with the event's file. An event is only processed if it passes [isRelevantEvent].
|
||||
*
|
||||
* Use one of the *before* or *after* variants to implement this listener:
|
||||
*
|
||||
* - [AbstractSingleFileModuleBeforeFileEventListener]
|
||||
* - [AbstractSingleFileModuleAfterFileEventListener]
|
||||
*/
|
||||
sealed class AbstractSingleFileModuleFileEventListener(private val project: Project) : BulkFileListener {
|
||||
protected abstract fun isRelevantEvent(event: VFileEvent, file: VirtualFile): Boolean
|
||||
|
||||
protected abstract fun processEvent(event: VFileEvent, module: KtModule)
|
||||
|
||||
internal fun processEvents(events: List<VFileEvent>) {
|
||||
for (event in events) {
|
||||
val file = event.file ?: continue
|
||||
if (!isRelevantEvent(event, file)) continue
|
||||
if (!file.mayBeFromSingleFileModule(project)) continue
|
||||
|
||||
// A `BulkFileListener` may receive events from other projects, which need to be ignored. This check is placed after
|
||||
// `mayBeFromSingleFileModule` because (1) `mayBeFromSingleFileModule` establishes that `file` is a Kotlin file, and we do not
|
||||
// need to check `isInContent` for non-Kotlin files, as we don't want to process them, and (2) for the common case where the
|
||||
// user has opened only one project and most Kotlin files are inside a source set, checking `!isInSourceContent` first excludes
|
||||
// most files in a single check, as opposed to checking `isInContent` first and then `!isInSourceContent`.
|
||||
if (!ProjectFileIndex.getInstance(project).isInContent(file)) continue
|
||||
|
||||
val module = file.getSingleFileModule() ?: continue
|
||||
processEvent(event, module)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given [VirtualFile] may come from a single-file [KtModule] with the following heuristics:
|
||||
*
|
||||
* 1. The file is a script if its extension is `.kts`.
|
||||
* 2. The file can only belong to a not-under-content-root `KtModule` if it isn't in some module's source content.
|
||||
*/
|
||||
private fun VirtualFile.mayBeFromSingleFileModule(project: Project): Boolean =
|
||||
extension == KotlinParserDefinition.STD_SCRIPT_SUFFIX ||
|
||||
isKotlinFileType() && !ProjectFileIndex.getInstance(project).isInSourceContent(this)
|
||||
|
||||
private fun VirtualFile.getSingleFileModule(): KtModule? =
|
||||
toPsiFile(project)
|
||||
?.let { ProjectStructureProvider.getModule(project, it, contextualModule = null) }
|
||||
?.takeIf { it is KtScriptModule || it is KtScriptDependencyModule || it is KtNotUnderContentRootModule }
|
||||
}
|
||||
|
||||
abstract class AbstractSingleFileModuleBeforeFileEventListener(project: Project) : AbstractSingleFileModuleFileEventListener(project) {
|
||||
override fun before(events: List<VFileEvent>) {
|
||||
processEvents(events)
|
||||
}
|
||||
}
|
||||
|
||||
abstract class AbstractSingleFileModuleAfterFileEventListener(project: Project) : AbstractSingleFileModuleFileEventListener(project) {
|
||||
override fun after(events: List<VFileEvent>) {
|
||||
processEvents(events)
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.util
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.productionSourceInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.testSourceInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
|
||||
/**
|
||||
* Returns the [KtModule]s for which modification events need to be published when this [Module] is affected.
|
||||
*
|
||||
* An event should be published for the production source info first, so this function cannot use `sourceModuleInfos` as is. Ordering the
|
||||
* production source module first allows some subscribers like session invalidation to *also* invalidate the test source module right away
|
||||
* via friend dependencies. Then the invalidation service can quickly skip invalidation of the test source module on the second event, as it
|
||||
* will already be invalidated.
|
||||
*/
|
||||
fun Module.toKtModulesForModificationEvents(): List<KtModule> =
|
||||
listOfNotNull(productionSourceInfo?.toKtModule(), testSourceInfo?.toKtModule())
|
||||
+17
-5
@@ -1,7 +1,9 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.codeInsight
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtAllowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.allowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtVariableLikeSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
@@ -18,19 +20,24 @@ class KotlinDeclarationNameValidator(
|
||||
|
||||
init {
|
||||
check(
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.PROPERTY ||
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.VARIABLE ||
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.PARAMETER
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.PROPERTY ||
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.VARIABLE ||
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.PARAMETER ||
|
||||
target == KotlinNameSuggestionProvider.ValidatorTarget.CLASS
|
||||
) {
|
||||
"Unsupported yet target $target"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun invoke(name: String): Boolean {
|
||||
val identifier = Name.identifier(name)
|
||||
|
||||
with(analysisSession) {
|
||||
if (hasConflict(identifier)) return false
|
||||
@OptIn(KtAllowAnalysisOnEdt::class)
|
||||
allowAnalysisOnEdt {
|
||||
with(analysisSession) {
|
||||
if (hasConflict(identifier)) return false
|
||||
}
|
||||
}
|
||||
|
||||
return visibleDeclarationsContext.siblings(withItself = checkVisibleDeclarationsContext).none { declaration ->
|
||||
@@ -49,6 +56,11 @@ class KotlinDeclarationNameValidator(
|
||||
!it.isExtension && (containingClassSymbol.value?.let { cl -> it.isVisibleInClass(cl) } != false)
|
||||
}
|
||||
}
|
||||
KotlinNameSuggestionProvider.ValidatorTarget.CLASS -> {
|
||||
val scope =
|
||||
visibleDeclarationsContext.containingKtFile.getScopeContextForPosition(visibleDeclarationsContext).getCompositeScope()
|
||||
scope.getClassifierSymbols(identifier).any()
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-12
@@ -9,11 +9,11 @@ import com.intellij.util.containers.addIfNotNull
|
||||
import com.intellij.util.text.NameUtilCore
|
||||
import org.jetbrains.kotlin.analysis.api.KtAnalysisSession
|
||||
import org.jetbrains.kotlin.analysis.api.calls.singleFunctionCallOrNull
|
||||
import org.jetbrains.kotlin.analysis.api.calls.symbol
|
||||
import org.jetbrains.kotlin.analysis.api.types.*
|
||||
import org.jetbrains.kotlin.builtins.PrimitiveType
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames
|
||||
import org.jetbrains.kotlin.idea.base.codeInsight.KotlinNameSuggester.Case.CAMEL
|
||||
import org.jetbrains.kotlin.idea.base.psi.getCallElement
|
||||
import org.jetbrains.kotlin.idea.base.psi.unquoteKotlinIdentifier
|
||||
import org.jetbrains.kotlin.lexer.KotlinLexer
|
||||
import org.jetbrains.kotlin.lexer.KtKeywordToken
|
||||
@@ -25,9 +25,7 @@ import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getOutermostParenthesizerOrThis
|
||||
import org.jetbrains.kotlin.psi.psiUtil.isIdentifier
|
||||
import org.jetbrains.kotlin.psi.psiUtil.parents
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.*
|
||||
import org.jetbrains.kotlin.util.match
|
||||
|
||||
@DslMarker
|
||||
private annotation class NameSuggesterDsl
|
||||
@@ -169,19 +167,10 @@ class KotlinNameSuggester(
|
||||
val valueArgument = argumentExpression.parent as? KtValueArgument ?: return emptySequence()
|
||||
val callElement = getCallElement(valueArgument) ?: return emptySequence()
|
||||
val resolvedCall = callElement.resolveCall()?.singleFunctionCallOrNull() ?: return emptySequence()
|
||||
if (!resolvedCall.symbol.hasStableParameterNames) return emptySequence()
|
||||
val parameter = resolvedCall.argumentMapping[valueArgument.getArgumentExpression()]?.symbol ?: return emptySequence()
|
||||
return suggestNameByValidIdentifierName(parameter.name.asString(), validator)?.let { sequenceOf(it) } ?: emptySequence()
|
||||
}
|
||||
|
||||
private fun getCallElement(valueArgument: KtValueArgument): KtCallElement? {
|
||||
return if (valueArgument is KtLambdaArgument) {
|
||||
valueArgument.parent as? KtCallElement
|
||||
} else {
|
||||
valueArgument.parents.match(KtValueArgumentList::class, last = KtCallElement::class)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns names based on a given type.
|
||||
* Examples:
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
@file:JvmName("KtCompilerFacilityUtils")
|
||||
|
||||
package org.jetbrains.kotlin.idea.base.codeInsight.compiler
|
||||
|
||||
import com.intellij.openapi.components.service
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.kotlin.analysis.api.components.KtCompilationResult
|
||||
import org.jetbrains.kotlin.analysis.api.components.KtCompilerFacilityMixIn
|
||||
import org.jetbrains.kotlin.analysis.api.components.KtCompilerTarget
|
||||
import org.jetbrains.kotlin.analysis.api.diagnostics.KtDiagnostic
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import java.io.File
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
interface KotlinCompilerIdeAllowedErrorFilter : (KtDiagnostic) -> Boolean {
|
||||
companion object {
|
||||
fun getInstance(): KotlinCompilerIdeAllowedErrorFilter = service()
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun KtCompilerFacilityMixIn.compileToDirectory(
|
||||
file: KtFile,
|
||||
configuration: CompilerConfiguration,
|
||||
target: KtCompilerTarget,
|
||||
allowedErrorFilter: (KtDiagnostic) -> Boolean,
|
||||
destination: File
|
||||
): KtCompilationResult {
|
||||
val result = compile(file, configuration, target, allowedErrorFilter)
|
||||
if (result is KtCompilationResult.Success) {
|
||||
for (outputFile in result.output) {
|
||||
val target = File(destination, outputFile.path)
|
||||
(target.parentFile ?: error("Can't find parent for file $target")).mkdirs()
|
||||
target.writeBytes(outputFile.content)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun KtCompilerFacilityMixIn.compileToJar(
|
||||
file: KtFile,
|
||||
configuration: CompilerConfiguration,
|
||||
target: KtCompilerTarget,
|
||||
allowedErrorFilter: (KtDiagnostic) -> Boolean,
|
||||
destination: File
|
||||
): KtCompilationResult {
|
||||
val result = compile(file, configuration, target, allowedErrorFilter)
|
||||
if (result is KtCompilationResult.Success) {
|
||||
destination.outputStream().buffered().use { os ->
|
||||
ZipOutputStream(os).use { zos ->
|
||||
for (outputFile in result.output) {
|
||||
zos.putNextEntry(ZipEntry(outputFile.path))
|
||||
zos.write(outputFile.content)
|
||||
zos.closeEntry()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
+6
-4
@@ -1,8 +1,9 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.core
|
||||
package org.jetbrains.kotlin.idea.base.codeInsight.compiler
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiFile
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.kotlin.codegen.ClassBuilder
|
||||
import org.jetbrains.kotlin.codegen.ClassBuilderFactory
|
||||
import org.jetbrains.kotlin.codegen.DelegatingClassBuilder
|
||||
@@ -10,10 +11,11 @@ import org.jetbrains.kotlin.codegen.DelegatingClassBuilderFactory
|
||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin
|
||||
|
||||
/**
|
||||
* A [ClassBuilderFactory] which maps the file names of generated classes to their original [PsiFile], allowing for example to filter code
|
||||
* generation output by class name.
|
||||
* A [ClassBuilderFactory] which maps the file names of generated classes to their original [PsiFile],
|
||||
* allowing for example to filter code generation output by class name.
|
||||
*/
|
||||
internal class OriginTracingClassBuilderFactory(
|
||||
@ApiStatus.Internal
|
||||
class OriginTracingClassBuilderFactory(
|
||||
private val delegateFactory: ClassBuilderFactory,
|
||||
) : DelegatingClassBuilderFactory(delegateFactory) {
|
||||
private val origins = mutableMapOf<String, MutableSet<PsiFile>>()
|
||||
+2
-1
@@ -48,9 +48,10 @@ class KotlinFacetModificationTracker(project: Project) :
|
||||
override fun dispose() = Unit
|
||||
|
||||
companion object {
|
||||
fun FacetEntity.isKotlinFacet() = name == KotlinFacetType.NAME
|
||||
|
||||
@JvmStatic
|
||||
fun getInstance(project: Project): KotlinFacetModificationTracker = project.service()
|
||||
}
|
||||
}
|
||||
|
||||
fun FacetEntity.isKotlinFacet(): Boolean = name == KotlinFacetType.NAME
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ import org.jetbrains.kotlin.config.KotlinFacetSettings
|
||||
import org.jetbrains.kotlin.config.KotlinFacetSettingsProvider
|
||||
import org.jetbrains.kotlin.idea.base.util.caching.*
|
||||
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerSettingsListener
|
||||
import org.jetbrains.kotlin.idea.facet.KotlinFacetModificationTracker.Companion.isKotlinFacet
|
||||
|
||||
class KotlinFacetSettingsProviderImpl(project: Project) :
|
||||
SynchronizedFineGrainedEntityCache<Module, KotlinFacetSettings>(project, doSelfInitialization = false),
|
||||
|
||||
+4
-1
@@ -5,7 +5,10 @@
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinModificationTrackerFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fe10.analysisApiProviders.Fe10KotlinModificationTrackerFactory"/>
|
||||
<projectService
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateTrackerProvider"/>
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService"/>
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinGlobalModificationService"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fe10.analysisApiProviders.Fe10KotlinGlobalModificationService"/>
|
||||
</extensions>
|
||||
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.fe10.analysisApiProviders
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.analysis.providers.impl.KotlinGlobalModificationServiceBase
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.KotlinCodeBlockModificationListener
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.KotlinModuleOutOfCodeBlockModificationTracker
|
||||
|
||||
internal class Fe10KotlinGlobalModificationService(private val project: Project) : KotlinGlobalModificationServiceBase(project) {
|
||||
@TestOnly
|
||||
override fun incrementModificationTrackers(includeBinaryTrackers: Boolean) {
|
||||
KotlinCodeBlockModificationListener.getInstance(project).incModificationCount()
|
||||
KotlinModuleOutOfCodeBlockModificationTracker.incrementModificationCountForAllModules(project)
|
||||
}
|
||||
}
|
||||
-22
@@ -4,37 +4,15 @@ package org.jetbrains.kotlin.idea.base.fe10.analysisApiProviders
|
||||
import com.intellij.java.library.JavaLibraryModificationTracker
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.ModificationTracker
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
|
||||
import org.jetbrains.kotlin.analysis.providers.KotlinModificationTrackerFactory
|
||||
import org.jetbrains.kotlin.analysis.providers.KtModuleStateTracker
|
||||
import org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateTrackerProvider
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.ideaModule
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.KotlinCodeBlockModificationListener
|
||||
import org.jetbrains.kotlin.idea.caches.trackers.KotlinModuleOutOfCodeBlockModificationTracker
|
||||
|
||||
internal class Fe10KotlinModificationTrackerFactory(private val project: Project) : KotlinModificationTrackerFactory() {
|
||||
override fun createProjectWideOutOfBlockModificationTracker(): ModificationTracker {
|
||||
return KotlinCodeBlockModificationListener.getInstance(project).kotlinOutOfCodeBlockTracker
|
||||
}
|
||||
|
||||
override fun createModuleWithoutDependenciesOutOfBlockModificationTracker(module: KtSourceModule): ModificationTracker {
|
||||
return KotlinModuleOutOfCodeBlockModificationTracker(module.ideaModule)
|
||||
}
|
||||
|
||||
override fun createLibrariesWideModificationTracker(): ModificationTracker {
|
||||
return JavaLibraryModificationTracker.getInstance(project)
|
||||
}
|
||||
|
||||
override fun createModuleStateTracker(module: KtModule): KtModuleStateTracker {
|
||||
return KotlinModuleStateTrackerProvider.getInstance(project).getModuleStateTrackerFor(module)
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
override fun incrementModificationsCount(includeBinaryTrackers: Boolean) {
|
||||
KotlinCodeBlockModificationListener.getInstance(project).incModificationCount()
|
||||
KotlinModuleOutOfCodeBlockModificationTracker.incrementModificationCountForAllModules(project)
|
||||
KotlinModuleStateTrackerProvider.getInstance(project).incrementModificationCountForAllModules(includeBinaryTrackers)
|
||||
}
|
||||
}
|
||||
+45
-1
@@ -8,8 +8,14 @@ import org.jetbrains.kotlin.analysis.api.descriptors.Fe10AnalysisFacade.Analysis
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtSymbolOrigin
|
||||
import org.jetbrains.kotlin.caches.resolve.KotlinCacheService
|
||||
import org.jetbrains.kotlin.idea.FrontendInternals
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.RootKindFilter
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.matches
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.moduleInfo
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.getResolutionFacade
|
||||
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
|
||||
import org.jetbrains.kotlin.psi.KtCodeFragment
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.calls.CallResolver
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||
@@ -51,7 +57,7 @@ internal class IdeFe10AnalysisFacade(private val project: Project): Fe10Analysis
|
||||
}
|
||||
|
||||
override fun analyze(elements: List<KtElement>, mode: AnalysisMode): BindingContext {
|
||||
val resolutionFacade = KotlinCacheService.getInstance(project).getResolutionFacade(elements)
|
||||
val resolutionFacade = getResolutionFacade(elements) ?: return BindingContext.EMPTY
|
||||
|
||||
if (mode == AnalysisMode.ALL_COMPILER_CHECKS) {
|
||||
return resolutionFacade.analyzeWithAllCompilerChecks(elements).bindingContext
|
||||
@@ -68,6 +74,44 @@ internal class IdeFe10AnalysisFacade(private val project: Project): Fe10Analysis
|
||||
return resolutionFacade.analyze(elements, bodyResolveMode)
|
||||
}
|
||||
|
||||
private fun getResolutionFacade(elements: List<KtElement>): ResolutionFacade? {
|
||||
val kotlinCacheService = KotlinCacheService.getInstance(project)
|
||||
|
||||
if (elements.size == 1) {
|
||||
kotlinCacheService.getResolutionFacade(elements.single())
|
||||
}
|
||||
|
||||
val files = elements
|
||||
.asSequence()
|
||||
.mapNotNull { it.containingFile }
|
||||
.mapNotNull { if (it is KtCodeFragment) it.context?.containingFile else it }
|
||||
.filterIsInstance<KtFile>()
|
||||
.distinct()
|
||||
.toList()
|
||||
|
||||
if (files.isEmpty()) {
|
||||
return null
|
||||
}
|
||||
|
||||
val scriptFiles = files.filter { it.isScript() }
|
||||
if (!scriptFiles.isEmpty()) {
|
||||
return kotlinCacheService.getResolutionFacade(scriptFiles)
|
||||
}
|
||||
|
||||
// The following logic is taken from 'KotlinCacheServiceImpl.filterNotInProjectSource()'
|
||||
val moduleInfo = files.first().moduleInfo
|
||||
val specialFiles = files
|
||||
.filterNot { RootKindFilter.projectSources.matches(it) && moduleInfo.contentScope.contains(it.virtualFile) }
|
||||
|
||||
if (specialFiles.isNotEmpty()) {
|
||||
// 'KotlinCacheServiceImpl' is bad in getting a resolution facade for multiple files outside the so-called 'main' module root.
|
||||
// Here we artificially choose the facade for the first element. It's not quite correct, still it's better than nothing.
|
||||
return kotlinCacheService.getResolutionFacade(specialFiles.first())
|
||||
}
|
||||
|
||||
return kotlinCacheService.getResolutionFacade(files)
|
||||
}
|
||||
|
||||
override fun getOrigin(file: VirtualFile): KtSymbolOrigin {
|
||||
return KtSymbolOrigin.SOURCE
|
||||
}
|
||||
|
||||
-227
@@ -1,227 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.core
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.output.OutputFile
|
||||
import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig
|
||||
import org.jetbrains.kotlin.backend.jvm.*
|
||||
import org.jetbrains.kotlin.codegen.ClassBuilderFactories
|
||||
import org.jetbrains.kotlin.codegen.ClassBuilderFactory
|
||||
import org.jetbrains.kotlin.codegen.DefaultCodegenFactory
|
||||
import org.jetbrains.kotlin.codegen.KotlinCodegenFacade
|
||||
import org.jetbrains.kotlin.codegen.state.GenerationState
|
||||
import org.jetbrains.kotlin.config.CommonConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.languageVersionSettings
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.idea.base.facet.platform.platform
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.languageVersionSettings
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.getResolutionFacade
|
||||
import org.jetbrains.kotlin.idea.core.util.InlineFunctionAnalyzer
|
||||
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
|
||||
import org.jetbrains.kotlin.load.kotlin.toSourceElement
|
||||
import org.jetbrains.kotlin.platform.isCommon
|
||||
import org.jetbrains.kotlin.platform.jvm.isJvm
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.resolve.source.PsiSourceFile
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||
import java.io.File
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipOutputStream
|
||||
|
||||
/**
|
||||
* @param shouldStubUnboundIrSymbols Whether unbound IR symbols should be stubbed instead of linked. This should be enabled if the [file]
|
||||
* could refer to symbols defined in another file of the same module. Such symbols are not compiled by [KotlinCompilerIde] (only [file]
|
||||
* itself is compiled) and cannot be linked from a dependency. [shouldStubUnboundIrSymbols] only has an effect if [JVMConfigurationKeys.IR]
|
||||
* is set to `true` in [initialConfiguration].
|
||||
*/
|
||||
class KotlinCompilerIde(
|
||||
private val file: KtFile,
|
||||
private val initialConfiguration: CompilerConfiguration = getDefaultCompilerConfiguration(file),
|
||||
private val classBuilderFactory: ClassBuilderFactory = ClassBuilderFactories.BINARIES,
|
||||
private val resolutionFacadeProvider: (KtFile) -> ResolutionFacade? = { file.getResolutionFacade() },
|
||||
private val classFilesOnly: Boolean = false,
|
||||
private val shouldStubUnboundIrSymbols: Boolean = false,
|
||||
) {
|
||||
companion object {
|
||||
private fun getDefaultCompilerConfiguration(file: KtFile): CompilerConfiguration {
|
||||
return CompilerConfiguration().apply {
|
||||
languageVersionSettings = file.languageVersionSettings
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CompiledFile(val path: String, val bytecode: ByteArray)
|
||||
|
||||
fun compileToDirectory(destination: File) {
|
||||
destination.mkdirs()
|
||||
|
||||
val state = compile() ?: return
|
||||
|
||||
try {
|
||||
for (outputFile in getFiles(state)) {
|
||||
val target = File(destination, outputFile.relativePath)
|
||||
(target.parentFile ?: error("Can't find parent for file $target")).mkdirs()
|
||||
target.writeBytes(outputFile.asByteArray())
|
||||
}
|
||||
} finally {
|
||||
state.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
fun compileToJar(destination: File) {
|
||||
destination.outputStream().buffered().use { os ->
|
||||
ZipOutputStream(os).use { zos ->
|
||||
val state = compile()
|
||||
|
||||
if (state != null) {
|
||||
try {
|
||||
for (outputFile in getFiles(state)) {
|
||||
zos.putNextEntry(ZipEntry(outputFile.relativePath))
|
||||
zos.write(outputFile.asByteArray())
|
||||
zos.closeEntry()
|
||||
}
|
||||
} finally {
|
||||
state.destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun compileToBytecode(): List<CompiledFile> {
|
||||
val state = compile() ?: return emptyList()
|
||||
|
||||
try {
|
||||
return getFiles(state).map { CompiledFile(it.relativePath, it.asByteArray()) }
|
||||
} finally {
|
||||
state.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
fun compile(): GenerationState? = compileImpl(traceClassFileOrigins = false)?.first
|
||||
|
||||
fun compileTracingOrigin(): Pair<GenerationState, ClassFileOrigins>? = compileImpl(traceClassFileOrigins = true)
|
||||
|
||||
private fun compileImpl(traceClassFileOrigins: Boolean): Pair<GenerationState, ClassFileOrigins>? {
|
||||
val project = file.project
|
||||
val platform = file.platform
|
||||
|
||||
if (!platform.isCommon() && !platform.isJvm()) return null
|
||||
|
||||
val resolutionFacade = resolutionFacadeProvider(file) ?: return null
|
||||
val configuration = initialConfiguration.copy().apply {
|
||||
put(JVMConfigurationKeys.DO_NOT_CLEAR_BINDING_CONTEXT, true)
|
||||
}
|
||||
val isIrBackend = configuration.getBoolean(JVMConfigurationKeys.IR)
|
||||
|
||||
// The binding context needs to be built from all files with reachable inline functions, as such files may contain classes whose
|
||||
// descriptors must be available in the binding context for the IR backend. Note that the full bytecode is only generated for
|
||||
// `file` because of filtering in `generateClassFilter`, while only select declarations from other files are generated if needed
|
||||
// by the backend.
|
||||
val inlineAnalyzer = InlineFunctionAnalyzer(
|
||||
resolutionFacade,
|
||||
analyzeOnlyReifiedInlineFunctions = configuration.getBoolean(CommonConfigurationKeys.DISABLE_INLINE),
|
||||
).apply { analyze(file) }
|
||||
val toProcess = inlineAnalyzer.allFiles()
|
||||
val bindingContext = resolutionFacade.analyzeWithAllCompilerChecks(toProcess).bindingContext
|
||||
|
||||
// The IR backend will try to regenerate object literals defined in inline functions from generated class files during inlining.
|
||||
// Hence, we need to be aware of which object declarations are defined in the relevant inline functions.
|
||||
val inlineObjectDeclarations = when {
|
||||
isIrBackend -> inlineAnalyzer.inlineObjectDeclarations()
|
||||
else -> setOf()
|
||||
}
|
||||
val inlineObjectDeclarationFiles = inlineObjectDeclarations.mapTo(mutableSetOf()) { it.containingKtFile }
|
||||
|
||||
val generateClassFilter = object : GenerationState.GenerateClassFilter() {
|
||||
override fun shouldGeneratePackagePart(ktFile: KtFile): Boolean {
|
||||
return file === ktFile || inlineObjectDeclarationFiles.contains(ktFile)
|
||||
}
|
||||
|
||||
override fun shouldAnnotateClass(processingClassOrObject: KtClassOrObject): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun shouldGenerateClass(processingClassOrObject: KtClassOrObject): Boolean {
|
||||
return processingClassOrObject.containingKtFile === file ||
|
||||
processingClassOrObject is KtObjectDeclaration && inlineObjectDeclarations.contains(processingClassOrObject)
|
||||
}
|
||||
|
||||
override fun shouldGenerateScript(script: KtScript): Boolean {
|
||||
return script.containingKtFile === file
|
||||
}
|
||||
|
||||
override fun shouldGenerateCodeFragment(script: KtCodeFragment) = false
|
||||
}
|
||||
|
||||
val codegenFactory = when {
|
||||
isIrBackend -> createJvmIrCodegenFactory(configuration)
|
||||
else -> DefaultCodegenFactory
|
||||
}
|
||||
|
||||
val originTracingClassBuilderFactory = if (traceClassFileOrigins) OriginTracingClassBuilderFactory(classBuilderFactory) else null
|
||||
|
||||
val state = GenerationState.Builder(
|
||||
project,
|
||||
originTracingClassBuilderFactory ?: classBuilderFactory,
|
||||
resolutionFacade.moduleDescriptor,
|
||||
bindingContext,
|
||||
toProcess,
|
||||
configuration,
|
||||
).generateDeclaredClassFilter(generateClassFilter)
|
||||
.codegenFactory(codegenFactory)
|
||||
.build()
|
||||
|
||||
KotlinCodegenFacade.compileCorrectFiles(state)
|
||||
return Pair(state, originTracingClassBuilderFactory?.classFileOrigins ?: emptyMap())
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a [JvmIrCodegenFactory] that stubs unbound symbols if [shouldStubUnboundIrSymbols] is enabled.
|
||||
*/
|
||||
private fun createJvmIrCodegenFactory(compilerConfiguration: CompilerConfiguration): JvmIrCodegenFactory {
|
||||
val jvmGeneratorExtensions = if (shouldStubUnboundIrSymbols) {
|
||||
object : JvmGeneratorExtensionsImpl(compilerConfiguration) {
|
||||
override fun getContainerSource(descriptor: DeclarationDescriptor): DeserializedContainerSource? {
|
||||
// Stubbed top-level function IR symbols (from other source files in the module) require a parent facade class to be
|
||||
// generated, which requires a container source to be provided. Without a facade class, function IR symbols will have
|
||||
// an `IrExternalPackageFragment` parent, which trips up code generation during IR lowering.
|
||||
val psiSourceFile =
|
||||
descriptor.toSourceElement.containingFile as? PsiSourceFile ?: return super.getContainerSource(descriptor)
|
||||
return FacadeClassSourceShimForFragmentCompilation(psiSourceFile)
|
||||
}
|
||||
}
|
||||
} else JvmGeneratorExtensionsImpl(compilerConfiguration)
|
||||
|
||||
val ideCodegenSettings = JvmIrCodegenFactory.IdeCodegenSettings(
|
||||
shouldStubAndNotLinkUnboundSymbols = shouldStubUnboundIrSymbols,
|
||||
shouldDeduplicateBuiltInSymbols = shouldStubUnboundIrSymbols,
|
||||
|
||||
// Because the file to compile may be contained in a "common" multiplatform module, an `expect` declaration doesn't necessarily
|
||||
// have an obvious associated `actual` symbol. `shouldStubOrphanedExpectSymbols` generates stubs for such `expect` declarations.
|
||||
shouldStubOrphanedExpectSymbols = true,
|
||||
|
||||
// Likewise, the file to compile may be contained in a "platform" multiplatform module, where the `actual` declaration is
|
||||
// referenced in the symbol table automatically, but not its `expect` counterpart, because it isn't contained in the files to
|
||||
// compile. `shouldReferenceUndiscoveredExpectSymbols` references such `expect` symbols in the symbol table so that they can
|
||||
// subsequently be stubbed.
|
||||
shouldReferenceUndiscoveredExpectSymbols = true,
|
||||
)
|
||||
|
||||
return JvmIrCodegenFactory(
|
||||
compilerConfiguration,
|
||||
PhaseConfig(jvmPhases),
|
||||
jvmGeneratorExtensions = jvmGeneratorExtensions,
|
||||
ideCodegenSettings = ideCodegenSettings,
|
||||
)
|
||||
}
|
||||
|
||||
private fun getFiles(state: GenerationState): List<OutputFile> {
|
||||
val allFiles = state.factory.asList()
|
||||
if (classFilesOnly) {
|
||||
return allFiles.filter { it.relativePath.endsWith(".class") }
|
||||
}
|
||||
return allFiles
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||
import org.jetbrains.kotlin.resolve.multiplatform.*
|
||||
|
||||
fun MemberDescriptor.expectedDescriptors(): List<DeclarationDescriptor> {
|
||||
val expectedCompatibilityMap = ExpectedActualResolver.findExpectedForActual(this)
|
||||
val expectedCompatibilityMap = ExpectedActualResolver.findExpectedForActual_incrementalCompilationWorkaround(this)
|
||||
?: return emptyList()
|
||||
|
||||
return expectedCompatibilityMap[ExpectActualCompatibility.Compatible]
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-stdlib" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-fe10" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-common" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-fe10" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-ir" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-jps-common" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.high-level-api" level="project" />
|
||||
<orderEntry type="library" name="Guava" level="project" />
|
||||
<orderEntry type="module" module-name="kotlin.base.util" />
|
||||
<orderEntry type="module" module-name="kotlin.base.psi" />
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.fe10.codeInsight.compiler
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.diagnostics.KtDiagnostic
|
||||
import org.jetbrains.kotlin.diagnostics.Errors
|
||||
import org.jetbrains.kotlin.idea.base.codeInsight.compiler.KotlinCompilerIdeAllowedErrorFilter
|
||||
|
||||
class K1KotlinCompilerIdeAllowedErrorFilter : KotlinCompilerIdeAllowedErrorFilter {
|
||||
private companion object {
|
||||
val ALLOWED_ERRORS = listOf(
|
||||
Errors.INVISIBLE_REFERENCE,
|
||||
Errors.INVISIBLE_MEMBER,
|
||||
Errors.INVISIBLE_SETTER,
|
||||
Errors.DEPRECATION_ERROR,
|
||||
Errors.DIVISION_BY_ZERO,
|
||||
Errors.OPT_IN_USAGE_ERROR,
|
||||
Errors.OPT_IN_OVERRIDE_ERROR,
|
||||
Errors.UNSAFE_CALL,
|
||||
Errors.UNSAFE_OPERATOR_CALL,
|
||||
Errors.ITERATOR_ON_NULLABLE,
|
||||
Errors.UNEXPECTED_SAFE_CALL,
|
||||
Errors.DSL_SCOPE_VIOLATION
|
||||
).map { it.name }
|
||||
}
|
||||
|
||||
override fun invoke(diagnostic: KtDiagnostic): Boolean {
|
||||
return diagnostic.factoryName in ALLOWED_ERRORS
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
<orderEntry type="module" module-name="kotlin.base.compiler-configuration" />
|
||||
<orderEntry type="module" module-name="kotlin.base.project-structure" />
|
||||
<orderEntry type="module" module-name="kotlin.base.facet" />
|
||||
<orderEntry type="module" module-name="kotlin.base.highlighting" />
|
||||
<orderEntry type="module" module-name="kotlin.highlighting.shared" />
|
||||
<orderEntry type="module" module-name="kotlin.base.fe10.analysis" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.java.psi" />
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="kotlin-language" name="Kotlin">
|
||||
<configuration version="5" platform="JVM 17" allPlatforms="JVM [17]" useProjectSettings="false">
|
||||
<compilerSettings>
|
||||
<option name="additionalArguments" value="-Xjvm-default=all -Xopt-in=com.intellij.openapi.util.IntellijInternalApi -Xskip-prerelease-check -Xcontext-receivers" />
|
||||
</compilerSettings>
|
||||
<compilerArguments>
|
||||
<stringArguments>
|
||||
<stringArg name="jvmTarget" arg="17" />
|
||||
<stringArg name="apiVersion" arg="1.8" />
|
||||
<stringArg name="languageVersion" arg="1.8" />
|
||||
</stringArguments>
|
||||
</compilerArguments>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="kotlinc.kotlin-stdlib" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.core" />
|
||||
<orderEntry type="module" module-name="intellij.platform.workspace.storage" />
|
||||
<orderEntry type="module" module-name="intellij.platform.backend.workspace" />
|
||||
<orderEntry type="module" module-name="kotlin.base.project-structure" />
|
||||
</component>
|
||||
</module>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<idea-plugin package="org.jetbrains.kotlin.idea.base.fe10.projectStructure">
|
||||
<projectListeners>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.fe10.projectStructure.Fe10OrderedWorkspaceModelChangeListener"
|
||||
topic="com.intellij.platform.backend.workspace.WorkspaceModelChangeListener"/>
|
||||
</projectListeners>
|
||||
</idea-plugin>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.fe10.projectStructure
|
||||
|
||||
import com.intellij.openapi.components.serviceIfCreated
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.platform.backend.workspace.WorkspaceModelChangeListener
|
||||
import com.intellij.platform.workspace.storage.VersionedStorageChange
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryInfoCache
|
||||
|
||||
/**
|
||||
* See `FirOrderedWorkspaceModelChangeListener` for why this workspace model listener exists.
|
||||
*/
|
||||
internal class Fe10OrderedWorkspaceModelChangeListener(private val project: Project) : WorkspaceModelChangeListener {
|
||||
override fun beforeChanged(event: VersionedStorageChange) {
|
||||
project.serviceIfCreated<LibraryInfoCache>()?.beforeWorkspaceModelChanged(event)
|
||||
}
|
||||
}
|
||||
+21
@@ -1,5 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="kotlin-language" name="Kotlin">
|
||||
<configuration version="5" platform="JVM 17" allPlatforms="JVM [17]" useProjectSettings="false">
|
||||
<compilerSettings>
|
||||
<option name="additionalArguments" value="-Xjvm-default=all -opt-in=com.intellij.openapi.util.IntellijInternalApi -Xskip-prerelease-check -Xcontext-receivers" />
|
||||
</compilerSettings>
|
||||
<compilerArguments>
|
||||
<stringArguments>
|
||||
<stringArg name="jvmTarget" arg="17" />
|
||||
<stringArg name="apiVersion" arg="1.8" />
|
||||
<stringArg name="languageVersion" arg="1.8" />
|
||||
</stringArguments>
|
||||
</compilerArguments>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
@@ -15,6 +31,7 @@
|
||||
<orderEntry type="library" name="kotlinc.kotlin-compiler-fir" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.analysis-project-structure" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.analysis-api-providers" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.high-level-api" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.high-level-api-fir" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.low-level-api-fir" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="kotlinc.kotlin-compiler-tests" level="project" />
|
||||
@@ -28,7 +45,11 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.projectModel.impl" />
|
||||
<orderEntry type="module" module-name="intellij.java.psi" />
|
||||
<orderEntry type="module" module-name="kotlin.base.analysis-api-providers" />
|
||||
<orderEntry type="module" module-name="kotlin.base.analysis-api.utils" />
|
||||
<orderEntry type="module" module-name="kotlin.base.plugin" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.java" />
|
||||
<orderEntry type="module" module-name="intellij.platform.externalSystem" scope="TEST" />
|
||||
<orderEntry type="module" module-name="kotlin.project-configuration" scope="TEST" />
|
||||
<orderEntry type="module" module-name="kotlin.base.facet" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
+21
-3
@@ -4,14 +4,32 @@
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinModificationTrackerFactory"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeKotlinModificationTrackerFactory"/>
|
||||
<projectService serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeModificationTrackerService"/>
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateTrackerProvider"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeKotlinModuleStateTrackerProvider"/>
|
||||
serviceInterface="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeKotlinModuleStateModificationService"/>
|
||||
<projectService
|
||||
serviceInterface="org.jetbrains.kotlin.analysis.providers.KotlinGlobalModificationService"
|
||||
serviceImplementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeKotlinGlobalModificationService"/>
|
||||
<psi.treeChangePreprocessor
|
||||
implementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirIdeOutOfBlockPsiTreeChangePreprocessor"/>
|
||||
<postStartupActivity implementation="org.jetbrains.kotlin.idea.base.fir.analysisApiProviders.FirAnalysisEventSubscriptionProjectActivity"/>
|
||||
</extensions>
|
||||
|
||||
<projectListeners>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$SingleFileModuleModificationListener"
|
||||
topic="com.intellij.openapi.vfs.newvfs.BulkFileListener"/>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$LibraryUpdatesListener"
|
||||
topic="com.intellij.openapi.vfs.newvfs.BulkFileListener"/>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$JdkListener"
|
||||
topic="com.intellij.openapi.projectRoots.ProjectJdkTable$Listener"/>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$NonWorkspaceModuleRootListener"
|
||||
topic="com.intellij.openapi.roots.ModuleRootListener"/>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$FileDocumentListener"
|
||||
topic="com.intellij.openapi.fileEditor.FileDocumentManagerListener"/>
|
||||
<listener class="org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService$MyDynamicPluginListener"
|
||||
topic="com.intellij.ide.plugins.DynamicPluginListener"/>
|
||||
</projectListeners>
|
||||
|
||||
<dependencies>
|
||||
<module name="kotlin.base.analysis-api-providers"/>
|
||||
</dependencies>
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.startup.ProjectActivity
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSessionInvalidationService
|
||||
import org.jetbrains.kotlin.analysis.providers.analysisMessageBus
|
||||
|
||||
/**
|
||||
* [FirAnalysisEventSubscriptionProjectActivity] sets up subscriptions to events published via [analysisMessageBus] for FIR services. This
|
||||
* approach is favored over defining `projectListeners` in the plugin XML configuration for two reasons:
|
||||
*
|
||||
* 1. [analysisMessageBus] is not guaranteed to be the same as the [Project]'s message bus, by design, and `projectListeners` registers
|
||||
* listeners with the project message bus.
|
||||
* 2. Services like [LLFirSessionInvalidationService] have to register listeners when running in the IDE, but also in Analysis API
|
||||
* standalone mode. We cannot register listeners via XML in standalone mode, so this approach allows putting the subscription
|
||||
* configuration in one place.
|
||||
*/
|
||||
internal class FirAnalysisEventSubscriptionProjectActivity : ProjectActivity {
|
||||
override suspend fun execute(project: Project) {
|
||||
LLFirSessionInvalidationService.getInstance(project).subscribeToModificationEvents()
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.analysis.providers.impl.KotlinGlobalModificationServiceBase
|
||||
|
||||
internal class FirIdeKotlinGlobalModificationService(private val project: Project) : KotlinGlobalModificationServiceBase(project) {
|
||||
@TestOnly
|
||||
override fun incrementModificationTrackers(includeBinaryTrackers: Boolean) {
|
||||
FirIdeKotlinModificationTrackerFactory.getInstance(project).incrementModificationsCount(includeBinaryTrackers)
|
||||
}
|
||||
}
|
||||
+13
-23
@@ -5,39 +5,29 @@ import com.intellij.java.library.JavaLibraryModificationTracker
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.ModificationTracker
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
|
||||
import org.jetbrains.kotlin.analysis.providers.KotlinModificationTrackerFactory
|
||||
import org.jetbrains.kotlin.analysis.providers.KtModuleStateTracker
|
||||
import org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateTrackerProvider
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.ideaModule
|
||||
|
||||
internal class FirIdeKotlinModificationTrackerFactory(private val project: Project) : KotlinModificationTrackerFactory() {
|
||||
private val modificationTrackerService = project.getService(FirIdeModificationTrackerService::class.java)
|
||||
private val projectOutOfBlockModificationTracker
|
||||
get() = FirIdeOutOfBlockModificationService.getInstance(project).projectOutOfBlockModificationTracker
|
||||
|
||||
override fun createProjectWideOutOfBlockModificationTracker(): ModificationTracker =
|
||||
modificationTrackerService.projectOutOfBlockModificationTracker
|
||||
private val libraryModificationTracker
|
||||
get() = JavaLibraryModificationTracker.getInstance(project) as JavaLibraryModificationTracker
|
||||
|
||||
override fun createModuleWithoutDependenciesOutOfBlockModificationTracker(module: KtSourceModule): ModificationTracker =
|
||||
modificationTrackerService.getModuleOutOfBlockModificationTracker(module.ideaModule)
|
||||
override fun createProjectWideOutOfBlockModificationTracker(): ModificationTracker = projectOutOfBlockModificationTracker
|
||||
|
||||
override fun createLibrariesWideModificationTracker(): ModificationTracker {
|
||||
return JavaLibraryModificationTracker.getInstance(project)
|
||||
}
|
||||
|
||||
override fun createModuleStateTracker(module: KtModule): KtModuleStateTracker {
|
||||
return KotlinModuleStateTrackerProvider.getInstance(project).getModuleStateTrackerFor(module)
|
||||
}
|
||||
override fun createLibrariesWideModificationTracker(): ModificationTracker = libraryModificationTracker
|
||||
|
||||
@TestOnly
|
||||
override fun incrementModificationsCount(includeBinaryTrackers: Boolean) {
|
||||
internal fun incrementModificationsCount(includeBinaryTrackers: Boolean) {
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
if (includeBinaryTrackers) {
|
||||
(createLibrariesWideModificationTracker() as JavaLibraryModificationTracker).incModificationCount()
|
||||
libraryModificationTracker.incModificationCount()
|
||||
}
|
||||
}
|
||||
|
||||
// `FirIdeModificationTrackerService` is for source modules only.
|
||||
modificationTrackerService.increaseModificationCountForAllModules()
|
||||
|
||||
KotlinModuleStateTrackerProvider.getInstance(project).incrementModificationCountForAllModules(includeBinaryTrackers)
|
||||
companion object {
|
||||
fun getInstance(project: Project): FirIdeKotlinModificationTrackerFactory =
|
||||
KotlinModificationTrackerFactory.getInstance(project) as FirIdeKotlinModificationTrackerFactory
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -4,16 +4,15 @@ package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
|
||||
import org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateModificationService
|
||||
import java.util.regex.Pattern
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.project.structure.LLFirBuiltinsSessionFactory
|
||||
import org.jetbrains.kotlin.idea.base.analysisApiProviders.KotlinModuleStateTrackerProvider
|
||||
|
||||
private val STDLIB_PATTERN = Pattern.compile("kotlin-stdlib-(\\d*)\\.(\\d*)\\.(\\d*)\\.jar")
|
||||
|
||||
class FirIdeKotlinModuleStateTrackerProvider(project: Project) : KotlinModuleStateTrackerProvider(project) {
|
||||
override fun shouldInvalidateBuiltinSession(events: List<VFileEvent>): Boolean {
|
||||
class FirIdeKotlinModuleStateModificationService(project: Project) : KotlinModuleStateModificationService(project) {
|
||||
override fun mayBuiltinsHaveChanged(events: List<VFileEvent>): Boolean {
|
||||
return events.find { event ->
|
||||
event is VFileContentChangeEvent && STDLIB_PATTERN.matcher(event.file.name).matches()
|
||||
} != null
|
||||
}
|
||||
}
|
||||
}
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.ModificationTracker
|
||||
import com.intellij.openapi.util.SimpleModificationTracker
|
||||
import org.jetbrains.kotlin.analysis.api.fir.utils.createCompositeModificationTracker
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
internal class FirIdeModificationTrackerService(val project : Project) : Disposable {
|
||||
/**
|
||||
* A project-wide out-of-block modification tracker for Kotlin sources. The modification count of this tracker will be incremented on
|
||||
* global PSI tree changes or for test purposes.
|
||||
*/
|
||||
val projectOutOfBlockModificationTracker: SimpleModificationTracker = SimpleModificationTracker()
|
||||
|
||||
/**
|
||||
* A module modification tracker is used by dependents which want to depend on *specific* module changes. This modification tracker for
|
||||
* *all* modules gives us the option to force such an update for all source modules.
|
||||
*
|
||||
* That functionality is distinct from [projectOutOfBlockModificationTracker], because a dependent will explicitly use a project OOB
|
||||
* tracker if it wants to depend on *any* OOB modification in the project.
|
||||
*/
|
||||
private val allModulesOutOfBlockModificationTracker: SimpleModificationTracker = SimpleModificationTracker()
|
||||
|
||||
private val moduleOutOfBlockModificationTrackerWrappers = ConcurrentHashMap<Module, ModuleOutOfBlockModificationTrackerWrapper>()
|
||||
|
||||
fun getModuleOutOfBlockModificationTracker(module: Module): ModificationTracker =
|
||||
getModuleOutOfBlockModificationTrackerWrapper(module).compositeModificationTracker
|
||||
|
||||
private fun getModuleOutOfBlockModificationTrackerWrapper(module: Module): ModuleOutOfBlockModificationTrackerWrapper =
|
||||
moduleOutOfBlockModificationTrackerWrappers.computeIfAbsent(module) {
|
||||
ModuleOutOfBlockModificationTrackerWrapper(
|
||||
allModulesOutOfBlockModificationTracker,
|
||||
SimpleModificationTracker(),
|
||||
)
|
||||
}
|
||||
|
||||
override fun dispose() {}
|
||||
|
||||
fun increaseModificationCountForAllModules() {
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
allModulesOutOfBlockModificationTracker.incModificationCount()
|
||||
}
|
||||
|
||||
fun increaseModificationCountForModule(module: Module) {
|
||||
getModuleOutOfBlockModificationTrackerWrapper(module).moduleModificationTracker.incModificationCount()
|
||||
}
|
||||
|
||||
fun increaseModificationCountForModuleAndProject(module: Module?) {
|
||||
if (module != null) {
|
||||
increaseModificationCountForModule(module)
|
||||
}
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The module's out-of-block modification tracker is a _composite_ modification tracker because it is made up of both the specific module's
|
||||
* tracker and the tracker for _all_ modules. Should these trackers be flattened into another composite modification tracker, the
|
||||
* "all modules" modification tracker will only be contained once in the resulting modification tracker, because modification trackers are
|
||||
* flattened uniquely by identity and there must only be a single instance of the "all modules" modification tracker per project.
|
||||
*/
|
||||
internal class ModuleOutOfBlockModificationTrackerWrapper(
|
||||
allModulesModificationTracker: ModificationTracker,
|
||||
val moduleModificationTracker: SimpleModificationTracker,
|
||||
) {
|
||||
val compositeModificationTracker = listOf(allModulesModificationTracker, moduleModificationTracker).createCompositeModificationTracker()
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.base.fir.analysisApiProviders
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.components.Service
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.SimpleModificationTracker
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.providers.analysisMessageBus
|
||||
import org.jetbrains.kotlin.analysis.providers.topics.KotlinTopics
|
||||
import org.jetbrains.kotlin.idea.util.toKtModulesForModificationEvents
|
||||
|
||||
/**
|
||||
* [FirIdeOutOfBlockModificationService] increments modification trackers and publishes subscription events on out-of-block modification
|
||||
* after PSI tree changes and for tests.
|
||||
*/
|
||||
@Service(Service.Level.PROJECT)
|
||||
internal class FirIdeOutOfBlockModificationService(val project: Project) : Disposable {
|
||||
/**
|
||||
* A project-wide out-of-block modification tracker for Kotlin sources which will be incremented on global PSI tree changes, on any
|
||||
* module out-of-block modification, and by tests.
|
||||
*/
|
||||
val projectOutOfBlockModificationTracker: SimpleModificationTracker = SimpleModificationTracker()
|
||||
|
||||
override fun dispose() {}
|
||||
|
||||
/**
|
||||
* Publishes out-of-block modification for [module]. Must be called in a write action.
|
||||
*/
|
||||
fun publishModuleOutOfBlockModification(module: KtModule) {
|
||||
ApplicationManager.getApplication().assertWriteAccessAllowed()
|
||||
|
||||
project.analysisMessageBus.syncPublisher(KotlinTopics.MODULE_OUT_OF_BLOCK_MODIFICATION).onModification(module)
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes out-of-block modification for [module]'s production and test source [KtModule]s. Must be called in a write action.
|
||||
*/
|
||||
fun publishModuleOutOfBlockModification(module: Module) {
|
||||
module.toKtModulesForModificationEvents().forEach { publishModuleOutOfBlockModification(it) }
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes out-of-block modification for [module] and the project itself. Must be called in a write action.
|
||||
*/
|
||||
fun publishModuleAndProjectOutOfBlockModification(module: KtModule) {
|
||||
publishModuleOutOfBlockModification(module)
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
}
|
||||
|
||||
/**
|
||||
* Publishes out-of-block modification for [module]'s production and test source [KtModule]s and the project itself. Must be called in a
|
||||
* write action.
|
||||
*/
|
||||
fun publishModuleAndProjectOutOfBlockModification(module: Module) {
|
||||
publishModuleOutOfBlockModification(module)
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
}
|
||||
|
||||
fun publishGlobalSourceOutOfBlockModification() {
|
||||
projectOutOfBlockModificationTracker.incModificationCount()
|
||||
|
||||
// We should not invalidate binary module content here, because global PSI tree changes have no effect on binary modules.
|
||||
project.analysisMessageBus.syncPublisher(KotlinTopics.GLOBAL_SOURCE_OUT_OF_BLOCK_MODIFICATION).onModification()
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun getInstance(project: Project): FirIdeOutOfBlockModificationService =
|
||||
project.getService(FirIdeOutOfBlockModificationService::class.java)
|
||||
}
|
||||
}
|
||||
+30
-8
@@ -12,9 +12,12 @@ import com.intellij.psi.impl.PsiTreeChangePreprocessor
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirInternals
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.file.structure.getNonLocalReanalyzableContainingDeclaration
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.file.structure.invalidateAfterInBlockModification
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.ProjectStructureProvider
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.base.util.module
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.psi.KtAnnotated
|
||||
import org.jetbrains.kotlin.psi.KtCodeFragment
|
||||
|
||||
@OptIn(LLFirInternals::class)
|
||||
internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Project) : PsiTreeChangePreprocessor {
|
||||
@@ -27,7 +30,7 @@ internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Pr
|
||||
}
|
||||
|
||||
if (event.isGlobalChange()) {
|
||||
project.getService(FirIdeModificationTrackerService::class.java).increaseModificationCountForAllModules()
|
||||
FirIdeOutOfBlockModificationService.getInstance(project).publishGlobalSourceOutOfBlockModification()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -63,7 +66,17 @@ internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Pr
|
||||
}
|
||||
|
||||
private fun outOfBlockInvalidation(element: PsiElement) {
|
||||
project.getService(FirIdeModificationTrackerService::class.java).increaseModificationCountForModuleAndProject(element.module)
|
||||
if (element.containingFile == null) {
|
||||
// PSI elements without a containing file, such as `PsiJavaDirectory`, are not supported by `ProjectStructureProvider`
|
||||
// and have no corresponding meaningful `KtModule`.
|
||||
element.module?.let { module ->
|
||||
FirIdeOutOfBlockModificationService.getInstance(project).publishModuleAndProjectOutOfBlockModification(module)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
val module = ProjectStructureProvider.getModule(project, element, contextualModule = null)
|
||||
FirIdeOutOfBlockModificationService.getInstance(project).publishModuleAndProjectOutOfBlockModification(module)
|
||||
}
|
||||
|
||||
private fun calculateChangeType(
|
||||
@@ -86,6 +99,8 @@ internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Pr
|
||||
psi is PsiWhiteSpace || psi is PsiComment -> ChangeType.Invisible
|
||||
else -> {
|
||||
val inBlockModificationOwner = psi.getNonLocalReanalyzableContainingDeclaration()
|
||||
?: psi.containingFile as? KtCodeFragment
|
||||
|
||||
if (inBlockModificationOwner != null && (psi.parent != inBlockModificationOwner || code != PsiEventType.CHILD_ADDED)) {
|
||||
ChangeType.InBlock(inBlockModificationOwner)
|
||||
} else {
|
||||
@@ -94,11 +109,18 @@ internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Pr
|
||||
}
|
||||
}
|
||||
|
||||
// Copy logic from PsiModificationTrackerImpl.treeChanged(). Some out-of-code-block events are written to language modification
|
||||
// tracker in PsiModificationTrackerImpl but don't have correspondent PomModelEvent. Increase kotlinOutOfCodeBlockTracker
|
||||
// manually if needed.
|
||||
/**
|
||||
* The logic for detecting global changes is taken from [PsiModificationTrackerImpl], with the following difference.
|
||||
*
|
||||
* We don't want to publish any global out-of-block modification on roots changes, because relevant roots changes already cause module
|
||||
* state modification events. Such a module state modification event includes the exact module that was affected by the roots change,
|
||||
* instead of a less specific global out-of-block modification event. This allows a consumer such as session invalidation to invalidate
|
||||
* sessions more granularly. Additionally, many roots changes don't require any event to be published because a corresponding [KtModule]
|
||||
* does not exist for the changed module (e.g. when no content roots have been added yet), so roots changes [PsiTreeChangeEvent]s are
|
||||
* overzealous, while the module state modification service can handle such cases gracefully.
|
||||
*/
|
||||
private fun PsiTreeChangeEventImpl.isGlobalChange() = when (code) {
|
||||
PsiEventType.PROPERTY_CHANGED -> propertyName === PsiTreeChangeEvent.PROP_UNLOADED_PSI || propertyName === PsiTreeChangeEvent.PROP_ROOTS
|
||||
PsiEventType.PROPERTY_CHANGED -> propertyName === PsiTreeChangeEvent.PROP_UNLOADED_PSI
|
||||
PsiEventType.CHILD_MOVED -> oldParent is PsiDirectory || newParent is PsiDirectory
|
||||
else -> parent is PsiDirectory
|
||||
}
|
||||
@@ -107,5 +129,5 @@ internal class FirIdeOutOfBlockPsiTreeChangePreprocessor(private val project: Pr
|
||||
private sealed class ChangeType {
|
||||
object OutOfBlock : ChangeType()
|
||||
object Invisible : ChangeType()
|
||||
class InBlock(val blockOwner: KtDeclaration) : ChangeType()
|
||||
class InBlock(val blockOwner: KtAnnotated) : ChangeType()
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers
|
||||
|
||||
import com.intellij.openapi.command.WriteCommandAction
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.roots.OrderRootType
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.testFramework.PsiTestUtil
|
||||
import com.intellij.util.io.jarFile
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.TestProjectStructureReader
|
||||
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
||||
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
|
||||
import org.jetbrains.kotlin.idea.test.addRoot
|
||||
import org.jetbrains.kotlin.test.util.addDependency
|
||||
import java.nio.file.Paths
|
||||
|
||||
typealias ProjectLibrariesByName = Map<String, Library>
|
||||
typealias ModulesByName = Map<String, Module>
|
||||
|
||||
abstract class AbstractProjectStructureTest<S : TestProjectStructure> : AbstractMultiModuleTest() {
|
||||
protected fun initializeProjectStructure(
|
||||
path: String,
|
||||
parser: TestProjectStructureParser<S>,
|
||||
): Triple<S, ProjectLibrariesByName, ModulesByName> {
|
||||
val testStructure = TestProjectStructureReader.readToTestStructure(
|
||||
Paths.get(path),
|
||||
testProjectStructureParser = parser,
|
||||
)
|
||||
|
||||
val jarFilesByRootLabel = testStructure.libraries
|
||||
.flatMapTo(mutableSetOf()) { it.roots }
|
||||
.associate { it to jarFile { }.generateInTempDir().toFile() }
|
||||
|
||||
val projectLibrariesByName = testStructure.libraries.associate { libraryData ->
|
||||
libraryData.name to ConfigLibraryUtil.addProjectLibrary(project, libraryData.name) {
|
||||
libraryData.roots.forEach { rootLabel ->
|
||||
addRoot(jarFilesByRootLabel.getValue(rootLabel), OrderRootType.CLASSES)
|
||||
}
|
||||
commit()
|
||||
}
|
||||
}
|
||||
|
||||
val modulesByName = testStructure.modules.associate { moduleData ->
|
||||
moduleData.name to createEmptyModule(moduleData.name)
|
||||
}
|
||||
|
||||
val duplicateNames = projectLibrariesByName.keys.intersect(modulesByName.keys)
|
||||
if (duplicateNames.isNotEmpty()) {
|
||||
error("Test project libraries and modules may not share names. Duplicate names: ${duplicateNames.joinToString()}.")
|
||||
}
|
||||
|
||||
testStructure.modules.forEach { moduleData ->
|
||||
val module = modulesByName.getValue(moduleData.name)
|
||||
moduleData.dependsOnModules.forEach { dependencyName ->
|
||||
projectLibrariesByName[dependencyName]
|
||||
?.let { library -> module.addDependency(library) }
|
||||
?: module.addDependency(modulesByName.getValue(dependencyName))
|
||||
}
|
||||
}
|
||||
|
||||
return Triple(testStructure, projectLibrariesByName, modulesByName)
|
||||
}
|
||||
|
||||
private fun createEmptyModule(name: String): Module {
|
||||
val tmpDir = createTempDirectory().toPath()
|
||||
val module: Module = createModule("$tmpDir/$name", moduleType)
|
||||
val root = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(tmpDir.toFile())!!
|
||||
WriteCommandAction.writeCommandAction(module.project).run<RuntimeException> {
|
||||
root.refresh(false, true)
|
||||
}
|
||||
|
||||
PsiTestUtil.addSourceContentToRoots(module, root)
|
||||
return module
|
||||
}
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers
|
||||
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonParser
|
||||
import com.google.gson.JsonPrimitive
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.kotlin.idea.jsonUtils.getString
|
||||
import java.nio.file.Path
|
||||
|
||||
internal data class TestProjectStructure(
|
||||
val modules: List<TestProjectModule>,
|
||||
val json: JsonObject,
|
||||
) {
|
||||
companion object {
|
||||
fun parse(json: JsonElement): TestProjectStructure {
|
||||
require(json is JsonObject)
|
||||
|
||||
return TestProjectStructure(
|
||||
json.getAsJsonArray("modules").map(TestProjectModule.Companion::parse),
|
||||
json,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
data class TestProjectModule(val name: String, val dependsOnModules: List<String>) {
|
||||
companion object {
|
||||
fun parse(json: JsonElement): TestProjectModule {
|
||||
require(json is JsonObject)
|
||||
val dependencies = if (json.has(DEPENDS_ON_FIELD)) {
|
||||
json.getAsJsonArray(DEPENDS_ON_FIELD).map { (it as JsonPrimitive).asString }
|
||||
} else emptyList()
|
||||
return TestProjectModule(
|
||||
json.getString("name"),
|
||||
dependencies
|
||||
)
|
||||
}
|
||||
|
||||
private const val DEPENDS_ON_FIELD = "dependsOn"
|
||||
}
|
||||
}
|
||||
|
||||
internal object TestProjectStructureReader {
|
||||
fun read(testDirectory: Path, jsonFileName: String = "structure.json"): TestProjectStructure {
|
||||
val jsonFile = testDirectory.resolve(jsonFileName)
|
||||
|
||||
val json = JsonParser.parseString(FileUtil.loadFile(jsonFile.toFile(), /*convertLineSeparators=*/true))
|
||||
return TestProjectStructure.parse(json)
|
||||
}
|
||||
|
||||
fun <T> readToTestStructure(
|
||||
testDirectory: Path,
|
||||
jsonFileName: String = "structure.json",
|
||||
toTestStructure: (TestProjectStructure) -> T,
|
||||
): T = read(testDirectory, jsonFileName).let(toTestStructure)
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.dependents
|
||||
|
||||
import com.google.gson.JsonObject
|
||||
import java.io.File
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KotlinModuleDependentsProvider
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryInfoCache
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.getMainKtSourceModule
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
import org.jetbrains.kotlin.idea.base.test.KotlinRoot
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.AbstractProjectStructureTest
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.TestProjectLibrary
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.TestProjectModule
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.TestProjectStructure
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.TestProjectStructureParser
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.TestProjectEntityReference
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.TestProjectEntityReferenceParser
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.TestProjectLibraryReference
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.TestProjectModuleReference
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.getAsJsonObjectList
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.testProjectStructure.getAsStringList
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.ProjectLibrariesByName
|
||||
import org.jetbrains.kotlin.idea.fir.analysis.providers.ModulesByName
|
||||
|
||||
abstract class AbstractModuleDependentsTest : AbstractProjectStructureTest<ModuleDependentsTestProjectStructure>() {
|
||||
override fun isFirPlugin(): Boolean = true
|
||||
|
||||
override fun getTestDataDirectory(): File =
|
||||
KotlinRoot.DIR.resolve("base").resolve("fir").resolve("analysis-api-providers").resolve("testData").resolve("moduleDependents")
|
||||
|
||||
private val moduleDependentsProvider get() = KotlinModuleDependentsProvider.getInstance(project)
|
||||
|
||||
protected fun doTest(path: String) {
|
||||
val (testStructure, projectLibrariesByName, modulesByName) =
|
||||
initializeProjectStructure(path, ModuleDependentsTestProjectStructureParser)
|
||||
|
||||
assertNotEmpty(testStructure.targets)
|
||||
|
||||
testStructure.targets.forEach { checkTarget(it, projectLibrariesByName, modulesByName) }
|
||||
}
|
||||
|
||||
private fun checkTarget(
|
||||
target: ModuleDependentsTestTarget,
|
||||
projectLibrariesByName: ProjectLibrariesByName,
|
||||
modulesByName: ModulesByName,
|
||||
) {
|
||||
val entityReference = target.entityReference
|
||||
|
||||
val targetModule = when (entityReference) {
|
||||
is TestProjectLibraryReference ->
|
||||
LibraryInfoCache.getInstance(project)[projectLibrariesByName.getValue(entityReference.name)].first().toKtModule()
|
||||
|
||||
is TestProjectModuleReference ->
|
||||
modulesByName.getValue(entityReference.name).getMainKtSourceModule()!!
|
||||
}
|
||||
|
||||
val directDependents = moduleDependentsProvider.getDirectDependents(targetModule)
|
||||
assertEquals(
|
||||
"Direct dependents of ${entityReference.name}:",
|
||||
target.directDependents,
|
||||
directDependents.map { (it as KtSourceModule).moduleName }.toSet(),
|
||||
)
|
||||
|
||||
val transitiveDependents = moduleDependentsProvider.getTransitiveDependents(targetModule)
|
||||
assertEquals(
|
||||
"Transitive dependents of ${entityReference.name}:",
|
||||
target.transitiveDependents,
|
||||
transitiveDependents.map { (it as KtSourceModule).moduleName }.toSet(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The module dependents test supports multiple module/library targets, which allows checking module dependents of all `KtModule`s defined
|
||||
* in the project structure, without duplicating the same project structure in multiple tests.
|
||||
*/
|
||||
data class ModuleDependentsTestProjectStructure(
|
||||
override val libraries: List<TestProjectLibrary>,
|
||||
override val modules: List<TestProjectModule>,
|
||||
val targets: List<ModuleDependentsTestTarget>,
|
||||
) : TestProjectStructure
|
||||
|
||||
private object ModuleDependentsTestProjectStructureParser : TestProjectStructureParser<ModuleDependentsTestProjectStructure> {
|
||||
private const val TARGETS_FIELD = "targets"
|
||||
|
||||
override fun parse(
|
||||
libraries: List<TestProjectLibrary>,
|
||||
modules: List<TestProjectModule>,
|
||||
json: JsonObject,
|
||||
): ModuleDependentsTestProjectStructure = ModuleDependentsTestProjectStructure(
|
||||
libraries,
|
||||
modules,
|
||||
json.getAsJsonObjectList(TARGETS_FIELD)!!.map(ModuleDependentsTestTargetParser::parse),
|
||||
)
|
||||
}
|
||||
|
||||
data class ModuleDependentsTestTarget(
|
||||
val entityReference: TestProjectEntityReference,
|
||||
val directDependents: Set<String>,
|
||||
val transitiveDependents: Set<String>,
|
||||
)
|
||||
|
||||
private object ModuleDependentsTestTargetParser {
|
||||
private const val DIRECT_DEPENDENTS_FIELD = "directDependents"
|
||||
private const val TRANSITIVE_DEPENDENTS_FIELD = "transitiveDependents"
|
||||
|
||||
fun parse(json: JsonObject): ModuleDependentsTestTarget {
|
||||
// We can parse `json` as the entity reference itself to avoid boilerplate around the entity reference.
|
||||
val entityReference = TestProjectEntityReferenceParser.parse(json)
|
||||
|
||||
return ModuleDependentsTestTarget(
|
||||
entityReference,
|
||||
json.getAsStringList(DIRECT_DEPENDENTS_FIELD)!!.toSet(),
|
||||
json.getAsStringList(TRANSITIVE_DEPENDENTS_FIELD)!!.toSet(),
|
||||
)
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.dependents;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.idea.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.idea.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.jetbrains.kotlin.idea.base.test.TestRoot;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* This class is generated by {@link org.jetbrains.kotlin.testGenerator.generator.TestGenerator}.
|
||||
* DO NOT MODIFY MANUALLY.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@TestRoot("base/fir/analysis-api-providers")
|
||||
@TestDataPath("$CONTENT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("testData/moduleDependents")
|
||||
public class ModuleDependentsTestGenerated extends AbstractModuleDependentsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryTree")
|
||||
public void testBinaryTree() throws Exception {
|
||||
runTest("testData/moduleDependents/binaryTree/");
|
||||
}
|
||||
|
||||
@TestMetadata("cyclical")
|
||||
public void testCyclical() throws Exception {
|
||||
runTest("testData/moduleDependents/cyclical/");
|
||||
}
|
||||
|
||||
@TestMetadata("cyclicalSelf")
|
||||
public void testCyclicalSelf() throws Exception {
|
||||
runTest("testData/moduleDependents/cyclicalSelf/");
|
||||
}
|
||||
|
||||
@TestMetadata("cyclicalWithOutsideDependency")
|
||||
public void testCyclicalWithOutsideDependency() throws Exception {
|
||||
runTest("testData/moduleDependents/cyclicalWithOutsideDependency/");
|
||||
}
|
||||
|
||||
@TestMetadata("deduplicatedLibraries")
|
||||
public void testDeduplicatedLibraries() throws Exception {
|
||||
runTest("testData/moduleDependents/deduplicatedLibraries/");
|
||||
}
|
||||
|
||||
@TestMetadata("linear")
|
||||
public void testLinear() throws Exception {
|
||||
runTest("testData/moduleDependents/linear/");
|
||||
}
|
||||
|
||||
@TestMetadata("rhombus")
|
||||
public void testRhombus() throws Exception {
|
||||
runTest("testData/moduleDependents/rhombus/");
|
||||
}
|
||||
|
||||
@TestMetadata("singleRoot")
|
||||
public void testSingleRoot() throws Exception {
|
||||
runTest("testData/moduleDependents/singleRoot/");
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.dependents
|
||||
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KotlinModuleDependentsProvider
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtSourceModule
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryInfoCache
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.getMainKtSourceModule
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
||||
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
|
||||
import org.jetbrains.kotlin.test.util.addDependency
|
||||
import org.junit.Assert
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* This test ensures that cached transitive dependents of the IDE's [KotlinModuleDependentsProvider] are properly invalidated.
|
||||
*/
|
||||
class TransitiveModuleDependentsCacheInvalidationTest : AbstractMultiModuleTest() {
|
||||
override fun getTestDataDirectory(): File = error("Should not be called")
|
||||
|
||||
override fun isFirPlugin(): Boolean = true
|
||||
|
||||
private val moduleDependentsProvider get() = KotlinModuleDependentsProvider.getInstance(project)
|
||||
|
||||
fun `test that cached transitive dependents of a module are invalidated after adding a new dependent`() {
|
||||
val moduleA = createModuleInTmpDir("a")
|
||||
val moduleB = createModuleInTmpDir("b")
|
||||
val moduleC = createModuleInTmpDir("c")
|
||||
val moduleD = createModuleInTmpDir("d")
|
||||
|
||||
moduleB.addDependency(moduleA)
|
||||
moduleC.addDependency(moduleB)
|
||||
|
||||
val ktModuleA = moduleA.getMainKtSourceModule()!!
|
||||
|
||||
Assert.assertEquals(
|
||||
setOf("b", "c"),
|
||||
ktModuleA.getTransitiveDependentNames(),
|
||||
)
|
||||
|
||||
moduleD.addDependency(moduleA)
|
||||
|
||||
Assert.assertEquals(
|
||||
setOf("b", "c", "d"),
|
||||
ktModuleA.getTransitiveDependentNames(),
|
||||
)
|
||||
}
|
||||
|
||||
fun `test that cached transitive dependents of a library are invalidated after adding a new dependent`() {
|
||||
val libraryA = ConfigLibraryUtil.addProjectLibraryWithClassesRoot(project, "a")
|
||||
val moduleB = createModuleInTmpDir("b")
|
||||
val moduleC = createModuleInTmpDir("c")
|
||||
val moduleD = createModuleInTmpDir("d")
|
||||
|
||||
moduleB.addDependency(libraryA)
|
||||
moduleC.addDependency(moduleB)
|
||||
|
||||
val ktModuleA = LibraryInfoCache.getInstance(project)[libraryA].first().toKtModule()
|
||||
|
||||
Assert.assertEquals(
|
||||
setOf("b", "c"),
|
||||
ktModuleA.getTransitiveDependentNames(),
|
||||
)
|
||||
|
||||
moduleD.addDependency(libraryA)
|
||||
|
||||
Assert.assertEquals(
|
||||
setOf("b", "c", "d"),
|
||||
ktModuleA.getTransitiveDependentNames(),
|
||||
)
|
||||
}
|
||||
|
||||
private fun KtModule.getTransitiveDependentNames(): Set<String> =
|
||||
moduleDependentsProvider.getTransitiveDependents(this).mapTo(mutableSetOf()) { (it as KtSourceModule).moduleName }
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.modificationEvents
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
|
||||
abstract class AbstractKotlinGlobalModificationEventTest<TRACKER : GlobalModificationEventTracker> : AbstractKotlinModificationEventTest<TRACKER>() {
|
||||
abstract fun constructTracker(): TRACKER
|
||||
|
||||
fun createTracker(): TRACKER = constructTracker().apply { initialize() }
|
||||
}
|
||||
|
||||
abstract class GlobalModificationEventTracker(project: Project, eventKind: String) : ModificationEventTracker(project, eventKind)
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.modificationEvents
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.util.messages.MessageBusConnection
|
||||
import org.jetbrains.kotlin.analysis.providers.analysisMessageBus
|
||||
import org.jetbrains.kotlin.idea.stubs.AbstractMultiModuleTest
|
||||
import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.junit.Assert
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractKotlinModificationEventTest<TRACKER : ModificationEventTracker> : AbstractMultiModuleTest() {
|
||||
override fun getTestDataDirectory(): File = error("Should not be called")
|
||||
|
||||
override fun isFirPlugin(): Boolean = true
|
||||
|
||||
protected fun createProjectLibrary(name: String): Library = ConfigLibraryUtil.addProjectLibraryWithClassesRoot(myProject, name)
|
||||
|
||||
protected fun createScript(name: String, text: String = ""): KtFile =
|
||||
createKtFileUnderNewContentRoot(FileWithText("$name.kts", text))
|
||||
|
||||
protected fun createNotUnderContentRootFile(name: String, text: String = ""): KtFile =
|
||||
// While the not-under-content-root module is named as it is, it is still decidedly under the project's content root, just not a
|
||||
// part of any other kind of `KtModule`.
|
||||
createKtFileUnderNewContentRoot(FileWithText("$name.kt", text))
|
||||
|
||||
protected fun disposeTrackers(vararg trackers: TRACKER) {
|
||||
trackers.forEach { Disposer.dispose(it) }
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ModificationEventTracker(
|
||||
private val project: Project,
|
||||
private val eventKind: String,
|
||||
) : Disposable {
|
||||
protected class ReceivedEvent(val isRemoval: Boolean)
|
||||
|
||||
protected val receivedEvents: MutableList<ReceivedEvent> = mutableListOf()
|
||||
|
||||
fun initialize() {
|
||||
val busConnection = project.analysisMessageBus.connect(this)
|
||||
configureSubscriptions(busConnection)
|
||||
}
|
||||
|
||||
protected abstract fun configureSubscriptions(busConnection: MessageBusConnection)
|
||||
|
||||
override fun dispose() { }
|
||||
|
||||
fun assertNotModified(label: String) {
|
||||
Assert.assertTrue(
|
||||
"${eventKind.replaceFirstChar { it.uppercaseChar() }} events for '$label' should not have been published, but ${receivedEvents.size} events were received.",
|
||||
receivedEvents.isEmpty(),
|
||||
)
|
||||
}
|
||||
|
||||
fun assertModifiedOnce(label: String, shouldBeRemoval: Boolean = false) {
|
||||
assertModified(label, expectedEventCount = 1, shouldBeRemoval)
|
||||
}
|
||||
|
||||
fun assertModified(label: String, expectedEventCount: Int, shouldBeRemoval: Boolean = false) {
|
||||
val eventCountString = if (expectedEventCount == 1) "A single" else expectedEventCount.toString()
|
||||
val eventOrEvents = if (expectedEventCount == 1) "event" else "events"
|
||||
Assert.assertTrue(
|
||||
"$eventCountString $eventKind $eventOrEvents for '$label' should have been published, but ${receivedEvents.size} events were received.",
|
||||
receivedEvents.size == expectedEventCount,
|
||||
)
|
||||
|
||||
val shouldOrShouldNotBeRemoval = if (shouldBeRemoval) "should" else "should not"
|
||||
receivedEvents.forEachIndexed { index, receivedEvent ->
|
||||
val indexInfo = if (expectedEventCount > 0) " (event index: $index)" else ""
|
||||
Assert.assertTrue(
|
||||
"The $eventKind event for '$label' $shouldOrShouldNotBeRemoval be a removal event$indexInfo.",
|
||||
receivedEvent.isRemoval == shouldBeRemoval,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.fir.analysis.providers.modificationEvents
|
||||
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.roots.libraries.Library
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.ProjectStructureProvider
|
||||
import org.jetbrains.kotlin.analysis.providers.topics.KotlinModuleStateModificationKind
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.LibraryInfoCache
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.productionSourceInfo
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.toKtModule
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
|
||||
abstract class AbstractKotlinModuleModificationEventTest<TRACKER : ModuleModificationEventTracker> : AbstractKotlinModificationEventTest<TRACKER>() {
|
||||
protected abstract fun constructTracker(module: KtModule): TRACKER
|
||||
|
||||
protected fun createTracker(module: KtModule): TRACKER = constructTracker(module).apply { initialize() }
|
||||
|
||||
protected fun createTracker(module: Module): TRACKER = createTracker(module.productionSourceInfo!!.toKtModule())
|
||||
|
||||
protected fun createTracker(library: Library): TRACKER =
|
||||
createTracker(LibraryInfoCache.getInstance(myProject)[library].single().toKtModule())
|
||||
|
||||
protected fun createTracker(file: KtFile): TRACKER =
|
||||
createTracker(ProjectStructureProvider.getModule(myProject, file, contextualModule = null))
|
||||
}
|
||||
|
||||
abstract class ModuleModificationEventTracker(
|
||||
private val module: KtModule,
|
||||
eventKind: String,
|
||||
) : ModificationEventTracker(module.project, eventKind) {
|
||||
fun handleEvent(eventModule: KtModule, modificationKind: KotlinModuleStateModificationKind) {
|
||||
if (eventModule == module) {
|
||||
receivedEvents.add(ReceivedEvent(modificationKind == KotlinModuleStateModificationKind.REMOVAL))
|
||||
}
|
||||
}
|
||||
|
||||
fun handleEvent(eventModule: KtModule) {
|
||||
handleEvent(eventModule, KotlinModuleStateModificationKind.UPDATE)
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user