Permalink
Browse files

AllOpen: Add IDE integration

  • Loading branch information...
yanex committed Dec 1, 2016
1 parent 4d638c2 commit 6abde4223bf8e657c94cf84a01132aa2719c956e
Showing with 677 additions and 175 deletions.
  1. +95 −88 .idea/artifacts/KotlinPlugin.xml
  2. +3 −1 .idea/modules.xml
  3. +2 −2 build.xml
  4. +3 −0 compiler/util/src/org/jetbrains/kotlin/utils/KotlinPaths.java
  5. +6 −0 compiler/util/src/org/jetbrains/kotlin/utils/KotlinPathsFromHomeDir.java
  6. +1 −0 compiler/util/src/org/jetbrains/kotlin/utils/PathUtil.java
  7. +1 −1 generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt
  8. +24 −12 idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/KotlinMavenImporter.kt
  9. +4 −0 idea/src/META-INF/extensions/ide.xml
  10. +12 −7 idea/src/META-INF/gradle.xml
  11. +8 −1 idea/src/META-INF/maven.xml
  12. +2 −0 idea/src/META-INF/plugin.xml
  13. +14 −1 idea/src/org/jetbrains/kotlin/idea/configuration/KotlinGradleProjectDataService.kt
  14. +14 −2 idea/src/org/jetbrains/kotlin/idea/inspections/gradle/KotlinGradleInspectionVisitor.kt
  15. +1 −1 libraries/tools/kotlin-allopen/pom.xml
  16. +33 −6 ...ries/tools/kotlin-allopen/src/main/kotlin/org/jetbrains/kotlin/allopen/gradle/AllOpenSubplugin.kt
  17. 0 plugins/allopen/{allopen.iml → allopen-cli/allopen-cli.iml}
  18. +20 −16 plugins/allopen/{ → allopen-cli}/src/AllOpenDeclarationAttributeAltererExtension.kt
  19. +4 −2 plugins/allopen/{ → allopen-cli}/src/AllOpenPlugin.kt
  20. 0 .../{ → allopen-cli}/src/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
  21. 0 ...en/{ → allopen-cli}/src/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
  22. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/allOpenOnNotClasses.kt
  23. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/allOpenOnNotClasses.txt
  24. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/alreadyOpen.kt
  25. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/alreadyOpen.txt
  26. +18 −0 plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt
  27. +4 −1 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/explicitFinal.txt
  28. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/metaAnnotation.kt
  29. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/metaAnnotation.txt
  30. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/nestedInner.kt
  31. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/nestedInner.txt
  32. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/noAllOpen.kt
  33. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/noAllOpen.txt
  34. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/sealed.kt
  35. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/sealed.txt
  36. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/severalAllOpen.kt
  37. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/severalAllOpen.txt
  38. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/simple.kt
  39. 0 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/simple.txt
  40. +3 −3 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/superClassAnnotation.kt
  41. +3 −3 plugins/allopen/{ → allopen-cli}/testData/bytecodeListing/superClassAnnotation.txt
  42. +23 −0 plugins/allopen/allopen-ide/allopen-ide.iml
  43. +29 −0 plugins/allopen/allopen-ide/src/AllOpenGradleProjectImportHandler.kt
  44. +56 −0 plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt
  45. +61 −0 plugins/allopen/allopen-ide/src/IdeAllOpenDeclarationAttributeAltererExtension.kt
  46. +0 −13 plugins/allopen/testData/bytecodeListing/explicitFinal.kt
  47. +21 −0 ...s/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml
  48. +66 −0 plugins/annotation-based-compiler-plugins-ide-support/src/AbstractGradleImportHandler.kt
  49. +78 −0 plugins/annotation-based-compiler-plugins-ide-support/src/AbstractMavenImportHandler.kt
  50. +52 −0 plugins/annotation-based-compiler-plugins-ide-support/src/idePluginUtils.kt
  51. +1 −1 plugins/plugins-tests/plugins-tests.iml
  52. +2 −2 plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt
  53. +13 −12 plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java
@@ -1,90 +1,97 @@
<component name="ArtifactManager">
<artifact name="KotlinPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/Kotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-plugin.jar">
<element id="module-output" name="backend" />
<element id="module-output" name="frontend" />
<element id="module-output" name="descriptors" />
<element id="module-output" name="frontend.java" />
<element id="module-output" name="descriptor.loader.java" />
<element id="module-output" name="idea" />
<element id="module-output" name="light-classes" />
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="module-output" name="j2k" />
<element id="module-output" name="js.frontend" />
<element id="module-output" name="js.parser" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="preloader" />
<element id="module-output" name="deserialization" />
<element id="module-output" name="backend-common" />
<element id="library" level="project" name="builtins" />
<element id="module-output" name="js.dart-ast" />
<element id="directory" name="kotlin">
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/native/kotlin" />
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/src/kotlin" />
</element>
<element id="module-output" name="eval4j" />
<element id="module-output" name="idea-analysis" />
<element id="module-output" name="ide-common" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="idea-android" />
<element id="module-output" name="idea-android-output-parser" />
<element id="module-output" name="js.serializer" />
<element id="module-output" name="serialization" />
<element id="module-output" name="idea-completion" />
<element id="module-output" name="idea-core" />
<element id="module-output" name="container" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="idea-repl" />
<element id="module-output" name="idea-live-templates" />
<element id="module-output" name="resolution" />
<element id="module-output" name="plugin-api" />
<element id="module-output" name="idea-ultimate" />
<element id="module-output" name="formatter" />
<element id="module-output" name="idea-maven" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar" path-in-jar="/" />
<element id="module-output" name="backend.common" />
<element id="module-output" name="ir.tree" />
<element id="module-output" name="backend.jvm" />
<element id="module-output" name="ir.psi2ir" />
</element>
<element id="library" level="project" name="javax.inject" />
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="library" level="project" name="markdown" />
<element id="archive" name="kotlin-android-extensions-plugin.jar">
<element id="module-output" name="android-extensions-idea" />
</element>
<element id="archive" name="kotlin-android-extensions-compiler-plugin.jar">
<element id="module-output" name="android-extensions-compiler" />
</element>
<element id="archive" name="android-lint.jar">
<element id="module-output" name="uast-kotlin" />
<element id="module-output" name="lint-idea" />
<element id="module-output" name="uast-java" />
<element id="module-output" name="uast-common" />
<element id="module-output" name="lint-checks" />
<element id="library" level="project" name="guava" />
<element id="module-output" name="lint-api" />
<element id="module-output" name="uast-android" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-daemon-client.jar" />
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-script-runtime.jar" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
</element>
</root>
</artifact>
<artifact name="KotlinPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/Kotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-plugin.jar">
<element id="module-output" name="backend" />
<element id="module-output" name="frontend" />
<element id="module-output" name="descriptors" />
<element id="module-output" name="frontend.java" />
<element id="module-output" name="descriptor.loader.java" />
<element id="module-output" name="idea" />
<element id="module-output" name="light-classes" />
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="module-output" name="j2k" />
<element id="module-output" name="js.frontend" />
<element id="module-output" name="js.parser" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="preloader" />
<element id="module-output" name="deserialization" />
<element id="module-output" name="backend-common" />
<element id="library" level="project" name="builtins" />
<element id="module-output" name="js.dart-ast" />
<element id="directory" name="kotlin">
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/native/kotlin" />
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/src/kotlin" />
</element>
<element id="module-output" name="eval4j" />
<element id="module-output" name="idea-analysis" />
<element id="module-output" name="ide-common" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="idea-android" />
<element id="module-output" name="idea-android-output-parser" />
<element id="module-output" name="js.serializer" />
<element id="module-output" name="serialization" />
<element id="module-output" name="idea-completion" />
<element id="module-output" name="idea-core" />
<element id="module-output" name="container" />
<element id="module-output" name="daemon-common" />
<element id="module-output" name="idea-repl" />
<element id="module-output" name="idea-live-templates" />
<element id="module-output" name="resolution" />
<element id="module-output" name="plugin-api" />
<element id="module-output" name="idea-ultimate" />
<element id="module-output" name="formatter" />
<element id="module-output" name="idea-maven" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar" path-in-jar="/" />
<element id="module-output" name="backend.common" />
<element id="module-output" name="ir.tree" />
<element id="module-output" name="backend.jvm" />
<element id="module-output" name="ir.psi2ir" />
<element id="module-output" name="annotation-based-compiler-plugins-ide-support" />
</element>
<element id="library" level="project" name="javax.inject" />
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="library" level="project" name="markdown" />
<element id="archive" name="kotlin-android-extensions-plugin.jar">
<element id="module-output" name="android-extensions-idea" />
</element>
<element id="archive" name="kotlin-android-extensions-compiler-plugin.jar">
<element id="module-output" name="android-extensions-compiler" />
</element>
<element id="archive" name="android-lint.jar">
<element id="module-output" name="uast-kotlin" />
<element id="module-output" name="lint-idea" />
<element id="module-output" name="uast-java" />
<element id="module-output" name="uast-common" />
<element id="module-output" name="lint-checks" />
<element id="library" level="project" name="guava" />
<element id="module-output" name="lint-api" />
<element id="module-output" name="uast-android" />
</element>
<element id="archive" name="allopen-ide-plugin.jar">
<element id="module-output" name="allopen-ide" />
</element>
<element id="archive" name="allopen-compiler-plugin.jar">
<element id="module-output" name="allopen-cli" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-daemon-client.jar" />
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-script-runtime.jar" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
</element>
</root>
</artifact>
</component>
@@ -3,13 +3,15 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kotlin.iml" filepath="$PROJECT_DIR$/Kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" filepath="$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/android-studio/android-studio.iml" filepath="$PROJECT_DIR$/android-studio/android-studio.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/android-tests/android-tests.iml" filepath="$PROJECT_DIR$/compiler/android-tests/android-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" filepath="$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" filepath="$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-processing/annotation-processing.iml" filepath="$PROJECT_DIR$/plugins/annotation-processing/annotation-processing.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/ant/ant.iml" filepath="$PROJECT_DIR$/ant/ant.iml" />
@@ -828,7 +828,7 @@
</withKotlin>
<skip pattern="kotlin/Metadata"/>
<src>
<pathelement path="plugins/allopen/src"/>
<pathelement path="plugins/allopen/allopen-cli/src"/>
</src>
<classpath>
<pathelement path="${idea.sdk}/core/intellij-core.jar"/>
@@ -839,7 +839,7 @@
<jar destfile="${kotlin-home}/lib/allopen-compiler-plugin.jar">
<fileset dir="${output}/classes/allopen-compiler-plugin"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<fileset dir="${basedir}/plugins/allopen/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/plugins/allopen/allopen-cli/src" includes="META-INF/services/**"/>
</jar>
</target>

@@ -48,6 +48,9 @@
@NotNull
File getJsStdLibSrcJarPath();

@NotNull
File getAllOpenPluginJarPath();

@NotNull
File getCompilerPath();

@@ -82,6 +82,12 @@ public File getJsStdLibSrcJarPath() {
return getLibraryFile(PathUtil.JS_LIB_SRC_JAR_NAME);
}

@NotNull
@Override
public File getAllOpenPluginJarPath() {
return getLibraryFile(PathUtil.ALLOPEN_PLUGIN_JAR_NAME);
}

@NotNull
@Override
public File getCompilerPath() {
@@ -29,6 +29,7 @@
public static final String JPS_KOTLIN_HOME_PROPERTY = "jps.kotlin.home";

public static final String JS_LIB_JAR_NAME = "kotlin-jslib.jar";
public static final String ALLOPEN_PLUGIN_JAR_NAME = "allopen-compiler-plugin.jar";
public static final String JS_LIB_SRC_JAR_NAME = "kotlin-jslib-sources.jar";
public static final String KOTLIN_JAVA_RUNTIME_JAR = "kotlin-runtime.jar";
public static final String KOTLIN_JAVA_REFLECT_JAR = "kotlin-reflect.jar";
@@ -1159,7 +1159,7 @@ fun main(args: Array<String>) {
}
}

testGroup("plugins/plugins-tests/tests", "plugins/allopen/testData") {
testGroup("plugins/plugins-tests/tests", "plugins/allopen/allopen-cli/testData") {
testClass<AbstractBytecodeListingTestForAllOpen>() {
model("bytecodeListing", extension = "kt")
}
Oops, something went wrong.

0 comments on commit 6abde42

Please sign in to comment.