Compare commits

..

3 Commits

Author SHA1 Message Date
Andrey Breslav
008c2cd022 ~~ Docs on domination started 2014-10-13 15:56:39 +04:00
Andrey Breslav
03ed8d28f2 ~~~ Disable failing backend tests 2014-10-13 15:56:39 +04:00
Andrey Breslav
4c636542aa !!! Tests for primitive operations 2014-10-13 15:56:38 +04:00
25153 changed files with 368427 additions and 600987 deletions

14
.idea/ant.xml generated
View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/grammar/buildGrammarLexer.xml" />
<buildFile url="file://$PROJECT_DIR$/compiler/frontend/buildLexer.xml" />
<buildFile url="file://$PROJECT_DIR$/build.xml">
<antCommandLine value="-J-XX:MaxPermSize=100m" />
<maximumHeapSize value="1024" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/update_dependencies.xml" />
@@ -11,13 +11,7 @@
<maximumHeapSize value="512" />
</buildFile>
<buildFile url="file://$PROJECT_DIR$/pluginPublisher/TeamCityPluginPublisher.xml" />
<buildFile url="file://$PROJECT_DIR$/idea-runner/runner.xml" />
<buildFile url="file://$PROJECT_DIR$/replicate_versions.xml" />
<buildFile url="file://$PROJECT_DIR$/libraries/build-docs.xml">
<maximumHeapSize value="1024" />
<properties>
<property name="dokka.path" value="../../dokka" />
</properties>
</buildFile>
<buildFile url="file://$PROJECT_DIR$/idea_runner/runner.xml" />
</component>
</project>
</project>

View File

@@ -1,9 +1,9 @@
<component name="ArtifactManager">
<artifact type="jar" name="IdeLazyResolver">
<output-path>$PROJECT_DIR$/out/artifacts/internal/</output-path>
<root id="archive" name="kotlin-ide-common.jar">
<element id="module-output" name="ide-common" />
<element id="dir-copy" path="$PROJECT_DIR$/idea/ide-common" />
<output-path>$PROJECT_DIR$/out/artifacts/IdeLazyResolver</output-path>
<root id="archive" name="ide-lazy-resolver.jar">
<element id="module-output" name="ide-lazy-resolve" />
<element id="dir-copy" path="$PROJECT_DIR$/idea/ide-lazy-resolve" />
</root>
</artifact>
</component>

View File

@@ -1,9 +1,9 @@
<component name="ArtifactManager">
<artifact type="jar" name="InjectorGenerator">
<output-path>$PROJECT_DIR$/out/artifacts/internal/</output-path>
<output-path>$PROJECT_DIR$/out/artifacts/InjectorGenerator</output-path>
<root id="archive" name="injector-generator.jar">
<element id="module-output" name="injector-generator" />
<element id="dir-copy" path="$PROJECT_DIR$/generators/injector-generator" />
<element id="dir-copy" path="$PROJECT_DIR$/injector-generator" />
</root>
</artifact>
</component>

View File

@@ -3,7 +3,8 @@
<output-path>$PROJECT_DIR$/out/artifacts/Instrumentation</output-path>
<root id="archive" name="Instrumentation.jar">
<element id="module-output" name="instrumentation" />
<element id="extracted-dir" path="$PROJECT_DIR$/ideaSDK/lib/asm-all.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/ideaSDK/lib/jetbrains-asm-debug-all-4.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/ideaSDK/lib/guava-17.0.jar" path-in-jar="/" />
</root>
</artifact>
</component>

View File

@@ -1,20 +0,0 @@
<component name="ArtifactManager">
<artifact name="KotlinAndroidExtensions">
<output-path>$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions</output-path>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-android-extensions.jar">
<element id="module-output" name="android-idea-plugin" />
</element>
<element id="directory" name="jps">
<element id="archive" name="kotlin-android-extensions-jps.jar">
<element id="module-output" name="android-jps-plugin" />
</element>
</element>
<element id="archive" name="android-compiler-plugin.jar">
<element id="module-output" name="android-compiler-plugin" />
</element>
</element>
</root>
</artifact>
</component>

View File

@@ -1,12 +1,6 @@
<component name="ArtifactManager">
<artifact name="KotlinBarePlugin">
<output-path>$PROJECT_DIR$/out/artifacts/BareKotlin</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="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
@@ -16,11 +10,13 @@
<element id="module-output" name="bare-plugin" />
<element id="module-output" name="descriptor.loader.java" />
<element id="module-output" name="frontend.java" />
<element id="module-output" name="serialization.java" />
<element id="module-output" name="descriptors" />
</element>
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-runtime.jar" />
</element>
</root>
</artifact>

View File

@@ -1,24 +1,18 @@
<component name="ArtifactManager">
<artifact type="jar" name="KotlinJpsPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/KotlinJpsPlugin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-jps-plugin</target>
</options>
</properties>
<root id="archive" name="kotlin-jps-plugin.jar">
<element id="directory" name="META-INF">
<element id="dir-copy" path="$PROJECT_DIR$/jps-plugin/src/META-INF" />
</element>
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/cli-parser-1.1.1.jar" path-in-jar="/" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="ide-compiler-runner" />
<element id="module-output" name="jps-plugin" />
<element id="module-output" name="preloader" />
<element id="module-output" name="util" />
<element id="module-output" name="util.runtime" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="file-copy" path="$PROJECT_DIR$/resources/manifest.properties" />
</root>
</artifact>
</component>

View File

@@ -1,12 +1,6 @@
<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">
@@ -16,16 +10,16 @@
<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="jet.as.java.psi" />
<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="ide-compiler-runner" />
<element id="module-output" name="preloader" />
<element id="module-output" name="deserialization" />
<element id="module-output" name="serialization" />
<element id="module-output" name="serialization.java" />
<element id="module-output" name="backend-common" />
<element id="library" level="project" name="builtins" />
<element id="module-output" name="js.dart-ast" />
@@ -35,20 +29,15 @@
</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="ide-lazy-resolve" />
<element id="file-copy" path="$PROJECT_DIR$/resources/manifest.properties" />
<element id="module-output" name="kotlin-android-plugin" />
<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="idea-js" />
</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="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-runtime.jar" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />

View File

@@ -287,4 +287,5 @@
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>
</project>

6
.idea/compiler.xml generated
View File

@@ -2,9 +2,6 @@
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/core/reflection.jvm" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
@@ -25,4 +22,5 @@
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
</component>
</project>
</project>

View File

@@ -4,7 +4,6 @@
<w>accessors</w>
<w>goto</w>
<w>gradle</w>
<w>intrinsics</w>
<w>kdoc</w>
<w>kompiler</w>
<w>memoize</w>

View File

@@ -1,7 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="bashor">
<words>
<w>ctor</w>
</words>
</dictionary>
</component>

View File

@@ -1,17 +1,9 @@
<component name="ProjectDictionaryState">
<dictionary name="valentin">
<words>
<w>delegator</w>
<w>funs</w>
<w>initializers</w>
<w>inserter</w>
<w>negatable</w>
<w>pparent</w>
<w>processings</w>
<w>rbracket</w>
<w>rparenth</w>
<w>selectioner</w>
<w>unpluralize</w>
</words>
</dictionary>
</component>

View File

@@ -402,6 +402,7 @@
</scope>
<option name="m_ignoreJavadoc" value="true" />
</inspection_tool>
<inspection_tool class="UnnecessaryInterfaceModifier" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UnnecessaryLabelOnBreakStatement" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnnecessaryLabelOnContinueStatement" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnnecessaryQualifierForThis" enabled="true" level="WARNING" enabled_by_default="true" />

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="Rhino">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/rhino-1.7.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/rhino-1.7.6-sources.jar!/rhino1.7.6/src" />
</SOURCES>
</library>
</component>

View File

@@ -5,7 +5,6 @@
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib" />
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib/jps" />
</CLASSES>
<JAVADOC />
<SOURCES>
@@ -16,6 +15,5 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/android/android/ultimate/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib/jps" recursive="false" />
</library>
</component>

View File

@@ -1,14 +0,0 @@
<component name="libraryTable">
<library name="ant">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/ant-1.8/lib/ant.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.8.2-src.zip!/apache-ant-1.8.2/src/main" />
</SOURCES>
</library>
</component>

21
.idea/libraries/ant_1_7.xml generated Normal file
View File

@@ -0,0 +1,21 @@
<component name="libraryTable">
<library name="ant-1.7">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/ant-1.7/lib/ant.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/core/loaderref/src" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/core/containersrc" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/types/assertions" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/taskdefs/apt" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/taskdefs/rmic/src" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/taskdefs/fixcrlf/input" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/etc/testcases/taskdefs/fixcrlf/expected" />
<root url="jar://$PROJECT_DIR$/dependencies/apache-ant-1.7.0-src.zip!/apache-ant-1.7.0/src/main" />
</SOURCES>
</library>
</component>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="cli-parser">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,13 +0,0 @@
<component name="libraryTable">
<library name="coverage-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/coverage/lib/coverage.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/coverage/lib/jacocoant.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/coverage/lib/coverage-agent.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/coverage/src" />
</SOURCES>
</library>
</component>

View File

@@ -4,11 +4,11 @@
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/android-5.0/lib/dx.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/dx.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/dependencies/dx-src/src" />
<root url="jar://$PROJECT_DIR$/dependencies/dx-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -2,7 +2,6 @@
<library name="idea-full">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/lib" />
@@ -11,7 +10,6 @@
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/guava-17.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm5-src.zip!/" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/gradle-tooling-extension-impl/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/groovy-psi/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/jetgroovy/java-production" />
@@ -20,6 +18,7 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/spellchecker/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework-java/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/util/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/src" />
@@ -74,9 +73,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/annotations/src" />
@@ -85,8 +81,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/duplicates-analysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-ex/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/extensions/src" />
@@ -137,7 +131,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/vcs-api-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-log/api/src" />
@@ -185,7 +178,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/editorconfig/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/remote-servers-git/src" />
@@ -196,9 +188,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/runtime/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/testSource" />
@@ -220,10 +212,8 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/groovy/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/javaFX/FxBuilderEmbedder/src" />
@@ -277,16 +267,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/rt/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/IntelliLang-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ide/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginTestSrc" />
@@ -334,6 +317,7 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/xml/xml-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/xml/xml-structure-view-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/xml/xml-structure-view-impl/src" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/lib" recursive="false" />
</library>

View File

@@ -2,13 +2,14 @@
<library name="intellij-core">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/core" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/guava-17.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm5-src.zip!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/gradle-tooling-extension-impl/java-production" />
@@ -19,6 +20,7 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/spellchecker/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework-java/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/util/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/src" />
@@ -73,9 +75,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/annotations/src" />
@@ -84,8 +83,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/duplicates-analysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-ex/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/extensions/src" />
@@ -136,7 +133,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/vcs-api-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-log/api/src" />
@@ -184,7 +180,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/editorconfig/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/remote-servers-git/src" />
@@ -195,9 +190,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/runtime/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/testSource" />
@@ -219,10 +214,8 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/groovy/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/javaFX/FxBuilderEmbedder/src" />
@@ -276,16 +269,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/rt/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/IntelliLang-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ide/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginTestSrc" />

View File

@@ -2,7 +2,6 @@
<library name="intellij-core-analysis">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/core-analysis/intellij-core-analysis.jar!/" />
@@ -10,6 +9,7 @@
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/asm5-src.zip!/" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/guava-17.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/gradle-tooling-extension-impl/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/groovy-psi/java-production" />
@@ -19,6 +19,7 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/spellchecker/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework-java/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-production" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/testFramework/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/.jps-build-data/groovyStubs/util/java-test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/RegExpSupport/src" />
@@ -73,9 +74,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/json/tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/annotations/src" />
@@ -84,8 +82,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/core-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/duplicates-analysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/dvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/editor-ui-ex/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/extensions/src" />
@@ -136,7 +132,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-api/vcs-api-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/vcs-log/api/src" />
@@ -184,7 +179,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/eclipse/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/editorconfig/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/generate-tostring/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/remote-servers-git/src" />
@@ -195,9 +189,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/git4idea/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/github/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/jps-plugin/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/runtime/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/google-app-engine/testSource" />
@@ -219,10 +213,8 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/groovy/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/hg4idea/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/engine/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/plugin/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-decompiler/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/java-i18n/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/javaFX/FxBuilderEmbedder/src" />
@@ -276,16 +268,9 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/rt/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/xslt-debugger/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/IntelliLang-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/course-creator/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/learn-python/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/edu/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ide/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/ipnb/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/python/pluginTestSrc" />

View File

@@ -1,12 +0,0 @@
<component name="libraryTable">
<library name="intellilang-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/IntelliLang/lib/IntelliLang.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/IntelliLang/java-support" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/plugins/IntelliLang/src" />
</SOURCES>
</library>
</component>

View File

@@ -19,7 +19,6 @@
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-java-2.5.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.zip!/platform/util-rt/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/jps" recursive="false" />
</library>

14
.idea/libraries/js_test_libs.xml generated Normal file
View File

@@ -0,0 +1,14 @@
<component name="libraryTable">
<library name="js-test-libs">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/js/js.tests/testLib/rhino-1.7R4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/js/js.tests/testLib/src/rhino-1.7R4-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -2,13 +2,10 @@
<library name="kotlin-runtime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime.jar!/" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-reflect.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/libraries/stdlib/src" />
<root url="file://$PROJECT_DIR$/core/builtins/src" />
<root url="file://$PROJECT_DIR$/core/runtime.jvm/src" />
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-runtime-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="markdown">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/markdown.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

3
.idea/misc.xml generated
View File

@@ -60,4 +60,5 @@
<option name="autoscroll" value="false" />
<option name="showOnlyWarnings" value="false" />
</component>
</project>
</project>

35
.idea/modules.xml generated
View File

@@ -3,61 +3,50 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kotlin.iml" filepath="$PROJECT_DIR$/Kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" group="plugins" />
<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-collector/annotation-collector.iml" filepath="$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/ant/ant.iml" filepath="$PROJECT_DIR$/ant/ant.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend/backend.iml" filepath="$PROJECT_DIR$/compiler/backend/backend.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend-common/backend-common.iml" filepath="$PROJECT_DIR$/compiler/backend-common/backend-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/build-tools/build-tools.iml" filepath="$PROJECT_DIR$/build-tools/build-tools.iml" />
<module fileurl="file://$PROJECT_DIR$/core/builtins/builtins.iml" filepath="$PROJECT_DIR$/core/builtins/builtins.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" filepath="$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli.iml" filepath="$PROJECT_DIR$/compiler/cli/cli.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/integration-tests/compiler-integration-tests.iml" filepath="$PROJECT_DIR$/compiler/integration-tests/compiler-integration-tests.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests/compiler-tests.iml" filepath="$PROJECT_DIR$/compiler/tests/compiler-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" filepath="$PROJECT_DIR$/core/descriptor.loader.java/descriptor.loader.java.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors/descriptors.iml" filepath="$PROJECT_DIR$/core/descriptors/descriptors.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" filepath="$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/deserialization/deserialization.iml" filepath="$PROJECT_DIR$/core/deserialization/deserialization.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/eval4j/eval4j.iml" filepath="$PROJECT_DIR$/eval4j/eval4j.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend/frontend.iml" filepath="$PROJECT_DIR$/compiler/frontend/frontend.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" filepath="$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/generators/generators.iml" filepath="$PROJECT_DIR$/generators/generators.iml" group="infrastructure" />
<module fileurl="file://$PROJECT_DIR$/grammar/grammar.iml" filepath="$PROJECT_DIR$/grammar/grammar.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/idea/ide-common/ide-common.iml" filepath="$PROJECT_DIR$/idea/ide-common/ide-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/ide-compiler-runner/ide-compiler-runner.iml" filepath="$PROJECT_DIR$/ide-compiler-runner/ide-compiler-runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/ide-lazy-resolve/ide-lazy-resolve.iml" filepath="$PROJECT_DIR$/idea/ide-lazy-resolve/ide-lazy-resolve.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea.iml" filepath="$PROJECT_DIR$/idea/idea.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" filepath="$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" filepath="$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-core/idea-core.iml" filepath="$PROJECT_DIR$/idea/idea-core/idea-core.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" filepath="$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-js/idea-js.iml" filepath="$PROJECT_DIR$/idea/idea-js/idea-js.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea-runner/idea-runner.iml" filepath="$PROJECT_DIR$/idea-runner/idea-runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" filepath="$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/generators/injector-generator/injector-generator.iml" filepath="$PROJECT_DIR$/generators/injector-generator/injector-generator.iml" group="infrastructure" />
<module fileurl="file://$PROJECT_DIR$/idea_runner/idea_runner.iml" filepath="$PROJECT_DIR$/idea_runner/idea_runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/injector-generator/injector-generator.iml" filepath="$PROJECT_DIR$/injector-generator/injector-generator.iml" group="infrastructure" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" filepath="$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/j2k/j2k.iml" filepath="$PROJECT_DIR$/j2k/j2k.iml" group="j2k" />
<module fileurl="file://$PROJECT_DIR$/compiler/java8-tests/java8-tests.iml" filepath="$PROJECT_DIR$/compiler/java8-tests/java8-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/jet.as.java.psi/jet.as.java.psi.iml" filepath="$PROJECT_DIR$/compiler/jet.as.java.psi/jet.as.java.psi.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/jps-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/jps-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/js/js.dart-ast/js.dart-ast.iml" filepath="$PROJECT_DIR$/js/js.dart-ast/js.dart-ast.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.frontend/js.frontend.iml" filepath="$PROJECT_DIR$/js/js.frontend/js.frontend.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.inliner/js.inliner.iml" filepath="$PROJECT_DIR$/js/js.inliner/js.inliner.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.parser/js.parser.iml" filepath="$PROJECT_DIR$/js/js.parser/js.parser.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.serializer/js.serializer.iml" filepath="$PROJECT_DIR$/js/js.serializer/js.serializer.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.tests/js.tests.iml" filepath="$PROJECT_DIR$/js/js.tests/js.tests.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.translator/js.translator.iml" filepath="$PROJECT_DIR$/js/js.translator/js.translator.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" filepath="$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" filepath="$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/light-classes/light-classes.iml" filepath="$PROJECT_DIR$/compiler/light-classes/light-classes.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" filepath="$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/preloader.iml" filepath="$PROJECT_DIR$/compiler/preloader/preloader.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" filepath="$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/reflection/reflection.iml" filepath="$PROJECT_DIR$/core/reflection/reflection.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" filepath="$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/serialization/serialization.iml" filepath="$PROJECT_DIR$/compiler/serialization/serialization.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/core/serialization/serialization.iml" filepath="$PROJECT_DIR$/core/serialization/serialization.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/serialization.java/serialization.java.iml" filepath="$PROJECT_DIR$/core/serialization.java/serialization.java.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/util/util.iml" filepath="$PROJECT_DIR$/compiler/util/util.iml" />
<module fileurl="file://$PROJECT_DIR$/core/util.runtime/util.runtime.iml" filepath="$PROJECT_DIR$/core/util.runtime/util.runtime.iml" group="core" />
</modules>
</component>
</project>
</project>

View File

@@ -2,18 +2,18 @@
<configuration default="false" name="All Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -2,18 +2,18 @@
<configuration default="false" name="All IDEA Plugin Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -2,18 +2,18 @@
<configuration default="false" name="All Jvm Backend Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet.codegen" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="All Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
@@ -13,7 +13,7 @@
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=400m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
@@ -22,6 +22,7 @@
<value defaultName="moduleWithDependencies" />
</option>
<envs>
<env name="kotlin.tests.actually.compile" value="true" />
<env name="NO_FS_ROOTS_ACCESS_CHECK" value="true" />
</envs>
<patterns />
@@ -34,9 +35,6 @@
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="compiler-quick" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="runtime" />
</method>
<method />
</configuration>
</component>

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="Android Studio" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Didea.paths.selector=AndroidStudioPreview -Didea.platform.prefix=AndroidStudio -Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions" />
<option name="VM_PARAMETERS" value="-Didea.paths.selector=AndroidStudioPreview -Didea.platform.prefix=AndroidStudio -Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/android-studio/sdk/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -24,9 +24,6 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
</method>
</configuration>
</component>

View File

@@ -4,8 +4,8 @@
<module name="android-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.android.tests" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.android.tests.AndroidRunner" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet.compiler.android" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.jet.compiler.android.AndroidRunner" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing" />

View File

@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate Injectors" type="JetRunConfigurationType" factoryName="Kotlin">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.generators.injectors.InjectorsPackage" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.jet.generators.injectors.InjectorsPackage" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="" />
@@ -10,13 +10,7 @@
<option name="PASS_PARENT_ENVS" value="true" />
<module name="generators" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>

View File

@@ -2,11 +2,11 @@
<configuration default="false" name="Generate Tests" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.generators.tests.*" />
<option name="PATTERN" value="org.jetbrains.jet.generators.tests.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.generators.tests.TestsPackage" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.jet.generators.tests.TestsPackage" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="IDEA" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions -Dkotlin.internal.mode.enabled=true" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -10,7 +10,7 @@
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<module name="idea_runner" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
@@ -43,10 +43,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea_runner/runner.xml" target="force_enable_kotlin_plugin" />
</method>
</configuration>
</component>

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=250m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=250m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -10,7 +10,7 @@
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<module name="idea_runner" />
<envs />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
@@ -24,10 +24,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinAndroidExtensions" />
</option>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea_runner/runner.xml" target="force_enable_kotlin_plugin" />
</method>
</configuration>
</component>

View File

@@ -4,10 +4,10 @@
<module name="jps-plugin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.jps.build" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet.jps.build" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.jet.jps.build.IncrementalJpsTestGenerated" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -Xmx512m -XX:MaxPermSize=320m -Dkotlin.incremental.compilation=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
@@ -16,12 +16,10 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns>
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalJpsTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalCacheVersionChangedTest" />
<pattern testClass="org.jetbrains.kotlin.jps.build.IncrementalConstantSearchTest" />
</patterns>
<envs>
<env name="kotlin.tests.actually.compile" value="false" />
</envs>
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
@@ -31,7 +29,7 @@
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="dist-quick-compiler-only" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/build.xml" target="dist_quick_compiler_only" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,31 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Integration Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-integration-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx350m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="J2K Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="PATTERN" value="org.jetbrains.jet.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
@@ -23,14 +23,8 @@
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Java 8 Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="java8-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -4,7 +4,7 @@
<module name="js.tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.js.test" />
<option name="PACKAGE_NAME" value="org.jetbrains.k2js.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />

View File

@@ -4,7 +4,7 @@
<module name="kannotator-jps-plugin-test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.jps.build.kannotator" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet.jps.build.kannotator" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />

View File

@@ -2,14 +2,14 @@
<configuration default="false" name="Smart Completion Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.completion.handlers.*" />
<option name="PATTERN" value="org.jetbrains.jet.completion.handlers.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.completion.handlers" />
<option name="PACKAGE_NAME" value="org.jetbrains.jet.completion.handlers" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
@@ -21,13 +21,13 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<envs>
<env name="kotlin.tests.actually.compile" value="false" />
</envs>
<patterns>
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.JvmSmartCompletionTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.handlers.SmartCompletionHandlerTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.handlers.SmartCompletionMultifileHandlerTest" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.weighers.SmartCompletionWeigherTestGenerated" />
<pattern testClass="org.jetbrains.kotlin.idea.completion.test.MultiFileSmartCompletionTestGenerated" />
<pattern testClass="org.jetbrains.jet.completion.JvmSmartCompletionTestGenerated" />
<pattern testClass="org.jetbrains.jet.completion.handlers.SmartCompletionHandlerTestGenerated" />
<pattern testClass="org.jetbrains.jet.completion.handlers.SmartCompletionMultifileHandlerTest" />
</patterns>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />

4
.idea/vcs.xml generated
View File

@@ -7,10 +7,6 @@
<option name="issueRegexp" value="[A-Z]+\-\d+" />
<option name="linkRegexp" value="http://youtrack.jetbrains.com/issue/$0" />
</IssueNavigationLink>
<IssueNavigationLink>
<option name="issueRegexp" value="EA\-(\d+)" />
<option name="linkRegexp" value="http://ea.jetbrains.com/browser/ea_problems/$1" />
</IssueNavigationLink>
</list>
</option>
</component>

View File

@@ -8,7 +8,6 @@
<excludeFolder url="file://$MODULE_DIR$/android.tests.dependencies" />
<excludeFolder url="file://$MODULE_DIR$/dependencies" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/androidSDK" />
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/config" />
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/config-idea" />
<excludeFolder url="file://$MODULE_DIR$/ideaSDK/system" />
@@ -22,25 +21,14 @@
<excludeFolder url="file://$MODULE_DIR$/libraries/kotlin-jdbc/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/kotlin-swing/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/kunit/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/stdlib/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/stdlib/validator/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/.idea" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kdoc-maven-plugin/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kdoc/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-compiler/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-gradle-plugin-core/local-repo" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-gradle-plugin-core/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-gradle-plugin-test/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-gradle-plugin/local-repo" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-gradle-plugin/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-js-library/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-js-tests-junit/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-js-tests/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-maven-plugin-test/local-repo" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-maven-plugin-test/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-maven-plugin/local-repo" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-maven-plugin/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-reflect/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/kotlin-stdlib-gen/target" />
<excludeFolder url="file://$MODULE_DIR$/libraries/tools/runtime/target" />
</content>
@@ -48,3 +36,4 @@
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -2,24 +2,24 @@
Welcome to [Kotlin](http://kotlinlang.org/)! Some handy links:
* [Kotlin Site](http://kotlinlang.org/)
* [Getting Started Guide](http://kotlinlang.org/docs/tutorials/getting-started.html)
* [Web Demo](http://kotlin-demo.jetbrains.com/)
* [Kotlin Site](http://jetbrains.github.com/kotlin/)
* [API](http://jetbrains.github.com/kotlin/versions/snapshot/apidocs/index.html)
* [Issue Tracker](http://youtrack.jetbrains.com/issues/KT)
* [Forum](http://devnet.jetbrains.net/community/kotlin?view=discussions)
* [Kotlin Blog](http://blog.jetbrains.com/kotlin/)
* [Follow Kotlin on Twitter](http://twitter.com/#!/project_kotlin)
* [follow Kotlin on twitter](http://twitter.com/#!/project_kotlin)
* [TeamCity CI build](https://teamcity.jetbrains.com/project.html?tab=projectOverview&projectId=Kotlin)
## Editing Kotlin
* [Kotlin IntelliJ IDEA Plugin](http://hadihariri.com/2012/02/17/the-kotlin-journey-part-i-getting-things-set-up/)
* [Kotlin IDEA Plugin](http://hadihariri.com/2012/02/17/the-kotlin-journey-part-i-getting-things-set-up/)
* [Kotlin TextMate Bundle](https://github.com/k33g/kotlin-textmate-bundle#readme)
## Building
To build this project, first time you try to build you need to run this (requires Apache **Ant 1.8** or higher and **JDK 1.6**):
To build this project, first time you try to build you need to run this (requires Apache Ant 1.8 or higher):
ant -f update_dependencies.xml
@@ -41,9 +41,9 @@ which will build the binaries of the compiler and put them into the 'dist' direc
from 'libraries' directory after building the compiler. Refer to `libraries/ReadMe.md` for details.
## Working with the project in IntelliJ IDEA
## Working with the project in IDEA
The [root kotlin project](https://github.com/JetBrains/kotlin) already has an IntelliJ IDEA project, you can just open it in IntelliJ IDEA.
The [root kotlin project](https://github.com/JetBrains/kotlin) already has an IDEA project, you can just open it in IDEA.
You may need to set the Project SDK (File -> Project Structure -> Project).
You may also need to add `tools.jar` to your SDK: File -> Project Structure -> SDKs -> <Your JDK> -> Classpath,
@@ -52,24 +52,24 @@ then choose the `tools.jar` in the JDK's `lib` directory.
If you are not dealing with Android, you may need to disable the Android Plugin in order to compile the project.
Since Kotlin project contains code written in Kotlin itself, you will also need a Kotlin plugin to build the project in IntelliJ IDEA.
To keep the plugin version in sync with the rest of the team and our [Continuous Integration server](https://teamcity.jetbrains.com/project.html?projectId=Kotlin&tab=projectOverview)
To keep the plugin version in sync with the rest of the team and our [Continuous Integration server](http://teamcity.jetbrains.com/project.html?projectId=Kotlin&tab=projectOverview)
you should install the according to the [instructions below](#plugin-for-contributors).
If you want to have an IntelliJ IDEA installation without the Kotlin plugin which is separate to your default IntelliJ IDEA installation which has the Kotlin
plugin [see this document](http://devnet.jetbrains.net/docs/DOC-181) which describes how to have mutliple IntelliJ IDEA installations using different configurations and plugin directories.
If you want to have an IDEA installation without the Kotlin plugin which is separate to your default IDEA installation which has the Kotlin
plugin [see this document](http://devnet.jetbrains.net/docs/DOC-181) which describes how to have mutliple IDEA installs using different configurations and plugin directories.
From this root project there are Run/Debug Configurations for running IDEA or the Compiler Tests for example; so if you want to try out the latest and greatest IDEA plugin
From this root project there are Run/Debug Configurations for running IDEA or the Compiler Tests for example; so if you want to try out the latest greatest IDEA plugin
* VCS -> Git -> Pull
* Run IntelliJ IDEA
* a child IntelliJ IDEA with the Kotlin plugin will then startup
* Run IDEA
* a child IDEA with the Kotlin plugin will then startup
* you can now open the [kotlin libraries project](https://github.com/JetBrains/kotlin/tree/master/libraries) to then work with the various kotlin libraries etc.
### <a name="pre-built-plugin"></a>Using a pre-built Kotlin IntelliJ IDEA plugin
### <a name="pre-built-plugin"></a>Using a pre-built Kotlin IDEA plugin
There are several options for getting Kotlin plugin. A stable version can be obtained as any other plugin for IntelliJ IDEA:
There are several options for getting Kotlin plugin. A stable version can be obtained as any other plugin for Intellij IDEA:
Preferences -> Plugins -> Install JetBrains plugin... -> Search with "Kotlin" string
Preferences -> Plugins -> Browse Repositories -> Search with "Kotlin" string
The most recent version of the plugin can be downloaded from the
[IDEA Plugin and Tests CI build](https://teamcity.jetbrains.com/project.html?projectId=project67&tab=projectOverview). When downloading is
@@ -81,7 +81,7 @@ You can now open any Kotlin based projects.
<a name="plugin-for-contributors"></a>
**Note for contributors**: If you are planning to contribute to Kotlin project you probably want to have locally the same version of plugin that build server is using for building.
As this version is constantly moving, the best way to always be updated is to let IntelliJ IDEA notify you when it is time to renew your plugin.
As this version is constantly moving, the best way to always be updated is to let IDEA notify you when it is time to renew you plugin.
Open
@@ -95,7 +95,7 @@ Then update the list of plugins in "Browse Repositories", you'll see two version
# Contributing
We love contributions! There's [lots to do on Kotlin](http://youtrack.jetbrains.com/issues/KT) and on the [standard library](https://youtrack.jetbrains.com/issues/KT?q=Subtask+of%3A+KT-2554+%23Unresolved) so why not chat with us on the [forum](http://devnet.jetbrains.net/community/kotlin?view=discussions) about what you're interested in doing?
We love contributions! There's [lots to do on kotlin](http://youtrack.jetbrains.com/issues/KT) and on the [standard library](https://youtrack.jetbrains.com/issues/KT?q=Subtask+of%3A+KT-2554+%23Unresolved) so why not chat with us on the [forum](http://devnet.jetbrains.net/community/kotlin?view=discussions) about what you're interested in doing?
If you want to find some issues to start off with, try [this query](https://youtrack.jetbrains.com/issues?q=tag%3A+%7BUp+For+Grabs%7D+%23Unresolved) which should find all issues that marked as "up-for-grabs".
@@ -110,7 +110,7 @@ Also the [JavaScript translation](https://github.com/JetBrains/kotlin/blob/maste
## If you want to work on the compiler
The Kotlin compiler is written in Java and Kotlin (we gradually migrate more and more of it to pure Kotlin). So the easiest way to work on the compiler or IntelliJ IDEA plugin is
The Kotlin compiler is written in Java and Kotlin (we gradually migrate more and more of it to pure Kotlin). So the easiest way to work on the compiler or IDEA plugin is
* download a clean [IDEA 14 EAP build](http://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP)
* [install the Kotlin plugin](#pre-built-plugin)

View File

@@ -1,6 +1,5 @@
<project name="Jet CI Steps" default="none">
<import file="build.xml" optional="false"/>
<import file="replicate_versions.xml" optional="false"/>
<property name="build.number" value="snapshot"/>
<property name="jdk16.home" value="${java.home}"/>
@@ -13,17 +12,12 @@
<property name="plugin.xml.bk" value="${version_substitute_dir}/plugin.xml.bk"/>
<property name="plugin.xml.versioned" value="${plugin.xml}.versioned" />
<property name="android-extensions.plugin.xml" value="plugins/android-idea-plugin/src/META-INF/plugin.xml"/>
<property name="android-extensions.plugin.xml.bk" value="${version_substitute_dir}/kotlin-android-extensions.plugin.xml.bk"/>
<property name="android-extensions.plugin.xml.versioned" value="${android-extensions.plugin.xml}.versioned" />
<property name="compiler.version.java" value="compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java"/>
<property name="compiler.version.java" value="compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/KotlinVersion.java"/>
<property name="compiler.version.java.bk" value="${version_substitute_dir}/KotlinVersion.java.bk"/>
<property name="compiler.version.java.versioned" value="${compiler.version.java}.versioned" />
<property name="plugin.zip" value="${artifact.output.path}/kotlin-plugin-${build.number}.zip" />
<property name="bare.plugin.zip" value="${artifact.output.path}/kotlin-bare-plugin-${build.number}.zip" />
<property name="android-extensions.zip" value="${artifact.output.path}/kotlin-android-extensions-plugin-${build.number}.zip" />
<macrodef name="echoprop">
<attribute name="prop"/>
@@ -87,24 +81,15 @@
target.file.versioned="${plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
<substituteVersionInFile
target.file="${android-extensions.plugin.xml}"
target.file.bk="${android-extensions.plugin.xml.bk}"
target.file.versioned="${android-extensions.plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
<substituteVersionInFile
target.file="${compiler.version.java}"
target.file.bk="${compiler.version.java.bk}"
target.file.versioned="${compiler.version.java.versioned}"
test.string="public static final String VERSION = &quot;@snapshot@&quot;;"/>
<replicateIdeaVersion target.file="${android-extensions.plugin.xml}" />
</target>
<target name="revertTemplateFiles">
<copy file="${plugin.xml.bk}" tofile="${plugin.xml}" overwrite="true"/>
<copy file="${android-extensions.plugin.xml.bk}" tofile="${android-extensions.plugin.xml}" overwrite="true"/>
<copy file="${compiler.version.java.bk}" tofile="${compiler.version.java}" overwrite="true"/>
<delete dir="${version_substitute_dir}" quiet="true"/>
@@ -129,46 +114,9 @@
<zipPlugin filename="${plugin.zip}" dir="Kotlin"/>
<zipPlugin filename="${bare.plugin.zip}" dir="BareKotlin"/>
<zip destfile="${android-extensions.zip}">
<zipfileset prefix="KotlinAndroidExtensions" dir="${artifact.output.path}/KotlinAndroidExtensions" />
</zip>
<delete dir="${artifact.output.path}/KotlinAndroidExtensions" quiet="true"/>
</target>
<macrodef name="print-statistic">
<attribute name="key"/>
<attribute name="value"/>
<sequential>
<echo message="##teamcity[buildStatisticValue key='@{key}' value='@{value}']"/>
</sequential>
</macrodef>
<macrodef name="print-file-size-statistic">
<attribute name="path"/>
<attribute name="file-name"/>
<sequential>
<local name="file.size" />
<length file="@{path}/@{file-name}" property="file.size"/>
<print-statistic key="@{file-name} size" value="${file.size}"/>
</sequential>
</macrodef>
<target name="printStatistics">
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-runtime.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-reflect.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-jslib.jar"/>
<print-file-size-statistic path="${output}" file-name="kotlin.js"/>
<print-file-size-statistic path="${output}" file-name="builtins.js"/>
<print-file-size-statistic path="${output}" file-name="builtins.meta.js"/>
<print-file-size-statistic path="${output}" file-name="stdlib.js"/>
<print-file-size-statistic path="${output}" file-name="stdlib.meta.js"/>
</target>
<target name="post_build" depends="zipArtifacts, revertTemplateFiles, printStatistics"/>
<target name="post_build" depends="zipArtifacts, revertTemplateFiles"/>
<target name="none">
<fail message="Either specify pre_build or post_build"/>

View File

@@ -168,57 +168,20 @@
name='com.intellij.codeInsight.editorActions.CopyPasteReferenceProcessor void restoreReferences(com.intellij.codeInsight.editorActions.ReferenceData[], TRef[]) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler boolean canSelect(com.intellij.psi.PsiElement) 0'>
<item
name='com.intellij.codeInsight.editorActions.JoinLinesHandlerDelegate int tryJoinLines(com.intellij.openapi.editor.Document, com.intellij.psi.PsiFile, int, int) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List&lt;TextRange&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 0'>
name='com.intellij.codeInsight.editorActions.JoinLinesHandlerDelegate int tryJoinLines(com.intellij.openapi.editor.Document, com.intellij.psi.PsiFile, int, int) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 1'>
name='com.intellij.codeInsight.editorActions.JoinRawLinesHandlerDelegate int tryJoinRawLines(com.intellij.openapi.editor.Document, com.intellij.psi.PsiFile, int, int) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandler java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 3'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange) 1'>
<annotation name='org.jetbrains.annotations.Nullable'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; expandToWholeLine(java.lang.CharSequence, com.intellij.openapi.util.TextRange, boolean) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List&lt;TextRange&gt;?&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase java.util.List&lt;com.intellij.openapi.util.TextRange&gt; select(com.intellij.psi.PsiElement, java.lang.CharSequence, int, com.intellij.openapi.editor.Editor) 3'>
name='com.intellij.codeInsight.editorActions.JoinRawLinesHandlerDelegate int tryJoinRawLines(com.intellij.openapi.editor.Document, com.intellij.psi.PsiFile, int, int) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -1,9 +0,0 @@
<root>
<item name='com.intellij.codeInsight.editorActions.wordSelection.BasicSelectioner boolean canSelect(com.intellij.psi.PsiElement) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.editorActions.wordSelection.BasicSelectioner boolean canSelectBasic(com.intellij.psi.PsiElement) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -5,7 +5,13 @@
<val name="value" val="&quot;fun isAvailable(project: Project, editor: Editor, file: PsiFile): Boolean&quot;"/>
</annotation>
</item>
<item
<item
name='com.intellij.codeInsight.intention.IntentionAction void invoke(com.intellij.openapi.project.Project, com.intellij.openapi.editor.Editor, com.intellij.psi.PsiFile)'>
<annotation name='jet.runtime.typeinfo.KotlinSignature'>
<val name="value" val="&quot;fun invoke(project: Project, editor: Editor, file: PsiFile): Unit&quot;"/>
</annotation>
</item>
<item
name='com.intellij.codeInsight.intention.PsiElementBaseIntentionAction boolean isAvailable(com.intellij.openapi.project.Project, com.intellij.openapi.editor.Editor, com.intellij.psi.PsiElement) 1'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -2,14 +2,7 @@
<item name='com.intellij.debugger.engine.DebugProcessImpl com.intellij.debugger.jdi.VirtualMachineProxyImpl getVirtualMachineProxy()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.debugger.engine.FrameExtraVariablesProvider java.util.Set&lt;com.intellij.debugger.engine.evaluation.TextWithImports&gt; collectVariables(com.intellij.debugger.SourcePosition, com.intellij.debugger.engine.evaluation.EvaluationContext, java.util.Set&lt;java.lang.String&gt;)'>
<annotation name='kotlin.jvm.KotlinSignature'>
<val name="value"
val="&quot;fun collectVariables(sourcePosition: SourcePosition?, evalContext: EvaluationContext?, alreadyCollected: Set&lt;String&gt;?): Set&lt;TextWithImports&gt;?&quot;"/>
</annotation>
</item>
<item
<item
name='com.intellij.debugger.engine.MethodFilter boolean locationMatches(com.intellij.debugger.engine.DebugProcessImpl, com.sun.jdi.Location) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>

View File

@@ -1,121 +1,117 @@
<root>
<item
name='com.intellij.formatting.DependentSpacingRule com.intellij.formatting.DependentSpacingRule registerData(com.intellij.formatting.DependentSpacingRule.Anchor, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.Spacing com.intellij.formatting.Spacing createKeepingFirstColumnSpacing(int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.Spacing com.intellij.formatting.Spacing createSpacing(int, int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder append(com.intellij.formatting.SpacingBuilder)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder after(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder around(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder around(com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder before(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder beforeInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder beforeInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder betweenInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder betweenInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder withinPair(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder withinPairInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder blankLines(int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder lineBreakInCode()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder lineBreakInCodeIf(boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder none()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spaceIf(boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spaces(int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spacing(int, int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.Spacing com.intellij.formatting.Spacing createKeepingFirstColumnSpacing(int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.Spacing com.intellij.formatting.Spacing createSpacing(int, int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder append(com.intellij.formatting.SpacingBuilder)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder after(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder afterInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder around(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder around(com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder aroundInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder before(com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder beforeInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder beforeInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder between(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder betweenInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder betweenInside(com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.TokenSet, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder withinPair(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder com.intellij.formatting.SpacingBuilder.RuleBuilder withinPairInside(com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType, com.intellij.psi.tree.IElementType)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder blankLines(int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder lineBreakInCode()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder lineBreakInCodeIf(boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder none()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spaceIf(boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spaces(int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.formatting.SpacingBuilder.RuleBuilder com.intellij.formatting.SpacingBuilder spacing(int, int, int, boolean, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -9,16 +9,4 @@
name='com.intellij.lang.SmartEnterProcessorWithFixers.FixEnterProcessor boolean doEnter(com.intellij.psi.PsiElement, com.intellij.psi.PsiFile, com.intellij.openapi.editor.Editor, boolean) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.lang.WhitespacesAndCommentsBinder int getEdgePosition(java.util.List&lt;com.intellij.psi.tree.IElementType&gt;, boolean, com.intellij.lang.WhitespacesAndCommentsBinder.TokenTextGetter) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
<annotation name='org.jetbrains.annotations.ReadOnly'/>
</item>
<item
name='com.intellij.lang.WhitespacesAndCommentsBinder int getEdgePosition(java.util.List&lt;com.intellij.psi.tree.IElementType&gt;, boolean, com.intellij.lang.WhitespacesAndCommentsBinder.TokenTextGetter) 2'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.lang.WhitespacesAndCommentsBinder.TokenTextGetter java.lang.CharSequence get(int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -1,17 +0,0 @@
<root>
<item name='com.intellij.openapi.util.text.LineTokenizer java.lang.String[] tokenize(char[], boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.text.LineTokenizer java.lang.String[] tokenize(char[], boolean, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.text.LineTokenizer java.lang.String[] tokenize(char[], int, int, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.text.LineTokenizer java.lang.String[] tokenize(char[], int, int, boolean, boolean)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.openapi.util.text.StringUtil java.lang.String decapitalize(java.lang.String)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -21,8 +21,4 @@
<item name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void updateMovedFile(com.intellij.psi.PsiFile) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler$1 void retargetUsages(java.util.List&lt;com.intellij.usageView.UsageInfo&gt;, java.util.Map&lt;com.intellij.psi.PsiElement,com.intellij.psi.PsiElement&gt;) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
</root>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="ant" level="project" />
<orderEntry type="library" name="kotlin-runtime" level="project" />
<orderEntry type="module" module-name="preloader" />
</component>
</module>

View File

@@ -1,7 +0,0 @@
<!-- NOTE: this Antlib is deprecated. Use org/jetbrains/kotlin/ant/antlib.xml instead -->
<!-- TODO: delete this file -->
<antlib>
<taskdef name="kotlinc" classname="org.jetbrains.kotlin.ant.Kotlin2JvmTask"/>
<taskdef name="kotlin2js" classname="org.jetbrains.kotlin.ant.Kotlin2JsTask"/>
<typedef name="withKotlin" classname="org.jetbrains.kotlin.ant.KotlinCompilerAdapter"/>
</antlib>

View File

@@ -1,77 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant
import org.apache.tools.ant.types.Path
import java.io.File
public class Kotlin2JsTask : KotlinCompilerBaseTask() {
override val compilerFqName = "org.jetbrains.kotlin.cli.js.K2JSCompiler"
public var library: Path? = null
public var outputPrefix: File? = null
public var outputPostfix: File? = null
public var sourceMap: Boolean = false
public var metaInfo: Boolean = false
/**
* {@link K2JsArgumentConstants.CALL} (default) if need generate a main function call (main function will be auto detected)
* {@link K2JsArgumentConstants.NO_CALL} otherwise.
*/
public var main: String? = null
public fun createLibrary(): Path {
val libraryPath = library
if (libraryPath == null) {
val t = Path(getProject())
library = t
return t
}
return libraryPath.createPath()
}
override fun fillSpecificArguments() {
args.add("-output")
args.add(output!!.canonicalPath)
// TODO: write test
library?.let {
args.add("-library-files")
args.add(it.list().map { File(it).canonicalPath }.join(separator = ","))
}
outputPrefix?.let {
args.add("-output-prefix")
args.add(it.canonicalPath)
}
outputPostfix?.let {
args.add("-output-postfix")
args.add(it.canonicalPath)
}
main?.let {
args.add("-main")
args.add(it)
}
if (noStdlib) args.add("-no-stdlib")
if (sourceMap) args.add("-source-map")
if (metaInfo) args.add("-meta-info")
}
}

View File

@@ -1,75 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import java.io.File.pathSeparator
public class Kotlin2JvmTask : KotlinCompilerBaseTask() {
override val compilerFqName = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler"
public var externalAnnotations: Path? = null
public var includeRuntime: Boolean = true
private var compileClasspath: Path? = null
public fun createExternalAnnotations(): Path {
if (externalAnnotations == null) {
externalAnnotations = Path(getProject())
}
return externalAnnotations!!.createPath()
}
public fun setClasspath(classpath: Path) {
if (compileClasspath == null) {
compileClasspath = classpath
}
else {
compileClasspath!!.append(classpath)
}
}
public fun setClasspathRef(ref: Reference) {
if (compileClasspath == null) {
compileClasspath = Path(getProject())
}
compileClasspath!!.createPath().setRefid(ref)
}
public fun addConfiguredClasspath(classpath: Path) {
setClasspath(classpath)
}
override fun fillSpecificArguments() {
args.add("-d")
args.add(output!!.canonicalPath)
compileClasspath?.let {
args.add("-classpath")
args.add(it.list().join(pathSeparator))
}
externalAnnotations?.let {
args.add("-annotations")
args.add(it.list().join(pathSeparator))
}
if (noStdlib) args.add("-no-stdlib")
if (includeRuntime) args.add("-include-runtime")
}
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant
import org.apache.tools.ant.AntClassLoader
import org.jetbrains.kotlin.preloading.ClassPreloadingUtils
import java.io.File
import java.lang.ref.SoftReference
import java.net.JarURLConnection
import kotlin.properties.Delegates
object KotlinAntTaskUtil {
private var classLoaderRef = SoftReference<ClassLoader?>(null)
private val libPath: File by Delegates.lazy {
// Find path of kotlin-ant.jar in the filesystem and find kotlin-compiler.jar in the same directory
val resourcePath = "/" + javaClass.getName().replace('.', '/') + ".class"
val jarConnection = javaClass.getResource(resourcePath).openConnection() as? JarURLConnection
?: throw UnsupportedOperationException("Kotlin compiler Ant task should be loaded from the JAR file")
val antTaskJarPath = File(jarConnection.getJarFileURL().toURI())
antTaskJarPath.getParentFile()
}
val compilerJar: File by Delegates.lazy {
File(libPath, "kotlin-compiler.jar").assertExists()
}
val runtimeJar: File by Delegates.lazy {
File(libPath, "kotlin-runtime.jar").assertExists()
}
private fun File.assertExists(): File {
if (!this.exists()) {
throw IllegalStateException("${getName()} is not found in the directory of Kotlin Ant task")
}
return this
}
synchronized fun getOrCreateClassLoader(): ClassLoader {
val cached = classLoaderRef.get()
if (cached != null) return cached
val myLoader = javaClass.getClassLoader()
if (myLoader !is AntClassLoader) return myLoader
val classLoader = ClassPreloadingUtils.preloadClasses(listOf(compilerJar), 4096, myLoader, null)
classLoaderRef = SoftReference(classLoader)
return classLoader
}
}

View File

@@ -1,143 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant;
import kotlin.KotlinPackage;
import kotlin.jvm.functions.Function1;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.MagicNames;
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.taskdefs.compilers.Javac13;
import org.apache.tools.ant.taskdefs.condition.AntVersion;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Path;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.apache.tools.ant.Project.MSG_WARN;
public class KotlinCompilerAdapter extends Javac13 {
private static final List<String> KOTLIN_EXTENSIONS = Arrays.asList("kt", "kts");
private Path externalAnnotations;
public List<Commandline.Argument> additionalArguments = new ArrayList<Commandline.Argument>(0);
public void setExternalAnnotations(Path externalAnnotations) {
this.externalAnnotations = externalAnnotations;
}
public Path createExternalAnnotations() {
if (externalAnnotations == null) {
externalAnnotations = new Path(getProject());
}
return externalAnnotations.createPath();
}
public Commandline.Argument createCompilerArg() {
Commandline.Argument argument = new Commandline.Argument();
additionalArguments.add(argument);
return argument;
}
@Override
public String[] getSupportedFileExtensions() {
List<String> result = KotlinPackage.plus(Arrays.asList(super.getSupportedFileExtensions()), KOTLIN_EXTENSIONS);
//noinspection SSBasedInspection
return result.toArray(new String[result.size()]);
}
@Override
public boolean execute() throws BuildException {
Javac javac = getJavac();
checkAntVersion();
Kotlin2JvmTask kotlinc = new Kotlin2JvmTask();
kotlinc.setFailOnError(javac.getFailonerror());
kotlinc.setOutput(javac.getDestdir());
Path classpath = javac.getClasspath();
if (classpath != null) {
kotlinc.setClasspath(classpath);
}
// We use the provided src dir instead of compileList, because the latter is insane:
// it is constructed only of sources which are newer than classes with the same name
kotlinc.setSrc(javac.getSrcdir());
kotlinc.setExternalAnnotations(externalAnnotations);
kotlinc.getAdditionalArguments().addAll(additionalArguments);
kotlinc.execute();
if (!Integer.valueOf(0).equals(kotlinc.getExitCode())) {
// Don't run javac if failOnError = false and there were errors on Kotlin sources
return false;
}
javac.log("Running javac...");
// Javac13#execute passes everything in compileList to javac, which doesn't recognize .kt files
compileList = filterOutKotlinSources(compileList);
addRuntimeToJavacClasspath(kotlinc);
return compileList.length == 0 || super.execute();
}
private void addRuntimeToJavacClasspath(@NotNull Kotlin2JvmTask kotlinc) {
for (String arg : kotlinc.getArgs()) {
// If "-no-stdlib" was specified explicitly, probably the user also wanted the javac classpath to not have it
if ("-no-stdlib".equals(arg)) return;
}
if (compileClasspath == null) {
compileClasspath = new Path(getProject());
}
compileClasspath.add(new Path(getProject(), KotlinAntTaskUtil.INSTANCE$.getRuntimeJar().getAbsolutePath()));
}
private void checkAntVersion() {
AntVersion checkVersion = new AntVersion();
checkVersion.setAtLeast("1.8.2");
if (!checkVersion.eval()) {
getJavac().log("<withKotlin> task requires Ant of version at least 1.8.2 to operate reliably. " +
"Please upgrade or, as a workaround, make sure you have at least one Java source and " +
"the output directory is clean before running this task. " +
"You have: " + getProject().getProperty(MagicNames.ANT_VERSION), MSG_WARN);
}
}
@NotNull
private static File[] filterOutKotlinSources(@NotNull File[] files) {
List<File> nonKotlinSources = KotlinPackage.filterNot(files, new Function1<File, Boolean>() {
@Override
public Boolean invoke(File file) {
for (String extension : KOTLIN_EXTENSIONS) {
if (file.getPath().endsWith("." + extension)) return true;
}
return false;
}
});
return nonKotlinSources.toArray(new File[nonKotlinSources.size()]);
}
}

View File

@@ -1,99 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.ant
import org.apache.tools.ant.BuildException
import org.apache.tools.ant.Task
import org.apache.tools.ant.types.Commandline
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import java.io.File
import java.io.PrintStream
public abstract class KotlinCompilerBaseTask : Task() {
protected abstract val compilerFqName: String
protected val args: MutableList<String> = arrayListOf()
public var src: Path? = null
public var output: File? = null
public var nowarn: Boolean = false
public var verbose: Boolean = false
public var printVersion: Boolean = false
public var failOnError: Boolean = false
public var noStdlib: Boolean = false
public val additionalArguments: MutableList<Commandline.Argument> = arrayListOf()
internal var exitCode: Int? = null
public fun createSrc(): Path {
val srcPath = src
if (srcPath == null) {
val t = Path(getProject())
src = t
return t
}
return srcPath.createPath()
}
public fun setSrcRef(ref: Reference) {
createSrc().setRefid(ref)
}
public fun createCompilerArg(): Commandline.Argument {
val argument = Commandline.Argument()
additionalArguments.add(argument)
return argument
}
abstract fun fillSpecificArguments()
private fun fillArguments() {
val sourcePaths = src ?: throw BuildException("\"src\" should be specified")
args.addAll(sourcePaths.list().map { File(it).canonicalPath })
output ?: throw BuildException("\"output\" should be specified")
if (nowarn) args.add("-nowarn")
if (verbose) args.add("-verbose")
if (printVersion) args.add("-version")
args.addAll(additionalArguments.flatMap { it.getParts().toList() })
fillSpecificArguments()
}
final override fun execute() {
fillArguments()
val compilerClass = KotlinAntTaskUtil.getOrCreateClassLoader().loadClass(compilerFqName)
val compiler = compilerClass.newInstance()
val exec = compilerClass.getMethod("execFullPathsInMessages", javaClass<PrintStream>(), javaClass<Array<String>>())
log("Compiling ${src!!.list().toList()} => [${output!!.canonicalPath}]");
val result = exec(compiler, System.err, args.toTypedArray())
exitCode = (result as Enum<*>).ordinal()
if (failOnError && exitCode != 0) {
throw BuildException("Compile failed; see the compiler error output for details.")
}
}
}

View File

@@ -1,5 +0,0 @@
<antlib>
<taskdef name="kotlinc" classname="org.jetbrains.kotlin.ant.Kotlin2JvmTask"/>
<taskdef name="kotlin2js" classname="org.jetbrains.kotlin.ant.Kotlin2JsTask"/>
<typedef name="withKotlin" classname="org.jetbrains.kotlin.ant.KotlinCompilerAdapter"/>
</antlib>

View File

@@ -0,0 +1,67 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.buildtools.ant
import org.apache.tools.ant.types.Path
import org.jetbrains.jet.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.jet.cli.common.messages.MessageCollectorPlainTextToStream
import org.jetbrains.jet.cli.js.K2JSCompiler
import java.io.File
import org.apache.tools.ant.BuildException
import org.jetbrains.jet.cli.common.ExitCode
import org.jetbrains.jet.config.Services
/**
* Kotlin JavaScript compiler Ant task.
* http://evgeny-goldin.org/javadoc/ant/tutorial-writing-tasks.html
*/
public class Kotlin2JsTask : KotlinCompilerBaseTask<K2JSCompilerArguments>() {
override val arguments = K2JSCompilerArguments()
override val compiler = K2JSCompiler()
public var library: Path? = null
public var outputPrefix: File? = null
public var outputPostfix: File? = null
public var sourceMap: Boolean = false
/**
* {@link K2JsArgumentConstants.CALL} (default) if need generate a main function call (main function will be auto detected)
* {@link K2JsArgumentConstants.NO_CALL} otherwise.
*/
public var main: String? = null
public fun createLibrary(): Path {
val libraryPath = library
if (libraryPath == null) {
val t = Path(getProject())
library = t
return t
}
return libraryPath.createPath()
}
override fun fillSpecificArguments() {
arguments.outputFile = getPath(output!!)
arguments.outputPrefix = outputPrefix?.canonicalPath
arguments.outputPostfix = outputPostfix?.canonicalPath
arguments.main = main
arguments.sourceMap = sourceMap
}
}

View File

@@ -0,0 +1,108 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.buildtools.ant
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import java.io.File
import java.io.File.pathSeparator
import org.jetbrains.jet.cli.jvm.K2JVMCompiler
import org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
import com.intellij.openapi.util.io.FileUtilRt
/**
* Kotlin bytecode compiler Ant task.
* <p/>
* See
* http://evgeny-goldin.org/javadoc/ant/tutorial-writing-tasks.html
* http://evgeny-goldin.org/javadoc/ant/develop.html
* http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java?view=markup.
*/
public class Kotlin2JvmTask : KotlinCompilerBaseTask<K2JVMCompilerArguments>() {
override val arguments = K2JVMCompilerArguments()
override val compiler = K2JVMCompiler()
public var noStdlib: Boolean = false
public var externalAnnotations: Path? = null
public var includeRuntime: Boolean = true
private var compileClasspath: Path? = null
public fun createExternalAnnotations(): Path {
if (externalAnnotations == null) {
externalAnnotations = Path(getProject())
}
return externalAnnotations!!.createPath()
}
/**
* Set the classpath to be used for this compilation.
*
* @param classpath an Ant Path object containing the compilation classpath.
*/
public fun setClasspath(classpath: Path) {
if (this.compileClasspath == null) {
this.compileClasspath = classpath
}
else {
this.compileClasspath!!.append(classpath)
}
}
/**
* Adds a reference to a classpath defined elsewhere.
*
* @param ref a reference to a classpath.
*/
public fun setClasspathRef(ref: Reference) {
if (this.compileClasspath == null) {
this.compileClasspath = Path(getProject())
}
this.compileClasspath!!.createPath().setRefid(ref)
}
/**
* Set the nested {@code <classpath>} to be used for this compilation.
*
* @param classpath an Ant Path object containing the compilation classpath.
*/
public fun addConfiguredClasspath(classpath: Path) {
setClasspath(classpath)
}
override fun fillSpecificArguments() {
arguments.destination = getPath(output!!)
val classpath = arrayListOf<String>()
compileClasspath?.let { classpath.addAll(it.list()) }
arguments.freeArgs?.forEach {
val file = File(it)
if (file.isDirectory() || file.extension != "kt") {
classpath.add(it)
}
}
arguments.classpath = classpath.join(pathSeparator)
arguments.annotations = externalAnnotations?.list()?.join(pathSeparator)
arguments.noStdlib = noStdlib
arguments.includeRuntime = includeRuntime
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.buildtools.ant;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter;
import org.apache.tools.ant.taskdefs.compilers.Javac13;
import org.apache.tools.ant.types.Path;
public class KotlinCompilerAdapter extends DefaultCompilerAdapter {
private Path externalAnnotations;
public void setExternalAnnotations(Path externalAnnotations) {
this.externalAnnotations = externalAnnotations;
}
public Path createExternalAnnotations() {
if (externalAnnotations == null) {
externalAnnotations = new Path(getProject());
}
return externalAnnotations.createPath();
}
@Override
public boolean execute() throws BuildException {
Javac javac = getJavac();
Kotlin2JvmTask kotlinTask = new Kotlin2JvmTask();
kotlinTask.setOutput(javac.getDestdir());
kotlinTask.setClasspath(javac.getClasspath());
kotlinTask.setSrc(javac.getSrcdir());
kotlinTask.setExternalAnnotations(externalAnnotations);
kotlinTask.execute();
javac.log("Running javac...");
Javac13 javac13 = new Javac13();
javac13.setJavac(javac);
return javac13.execute();
}
}

View File

@@ -0,0 +1,114 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.buildtools.ant
import org.apache.tools.ant.Task
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import org.jetbrains.jet.cli.common.messages.MessageCollectorPlainTextToStream
import java.io.File
import org.apache.tools.ant.BuildException
import org.jetbrains.jet.cli.common.ExitCode
import org.jetbrains.jet.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.jet.cli.common.CLICompiler
import org.apache.tools.ant.types.Commandline
import com.sampullara.cli.Args
import java.io.IOException
import org.jetbrains.jet.config
/**
* {@code file.getCanonicalPath()} convenience wrapper.
*
* @param file - file to get its canonical path.
* @return file's canonical path
*/
fun getPath(file: File): String {
try {
return file.getCanonicalPath()
}
catch (e: IOException) {
throw RuntimeException("Failed to resolve canonical file of [$file]: $e", e)
}
}
/**
* Base class for Kotlin compiler Ant tasks.
* http://evgeny-goldin.org/javadoc/ant/tutorial-writing-tasks.html
*/
public abstract class KotlinCompilerBaseTask<T : CommonCompilerArguments> : Task() {
protected abstract val arguments: T
protected abstract val compiler: CLICompiler<T>
public var src: Path? = null
public var output: File? = null
public val additionalArguments: MutableList<Commandline.Argument> = arrayListOf()
public fun createSrc(): Path {
val srcPath = src
if (srcPath == null) {
val t = Path(getProject())
src = t
return t
}
return srcPath.createPath()
}
public fun setSrcRef(ref: Reference) {
createSrc().setRefid(ref)
}
public fun createCompilerArg(): Commandline.Argument {
val argument = Commandline.Argument()
additionalArguments.add(argument)
return argument
}
abstract fun fillSpecificArguments()
private fun fillArguments() {
val sourcePaths = src ?: throw BuildException("\"src\" should be specified")
arguments.freeArgs = sourcePaths.list().map { getPath(File(it)) }
output ?: throw BuildException("\"output\" should be specified")
val args = additionalArguments.flatMap { it.getParts()!!.toList() }
try {
Args.parse(arguments, args.copyToArray())
}
catch (e: IllegalArgumentException) {
throw BuildException(e.getMessage())
}
fillSpecificArguments()
}
final override fun execute(): Unit {
fillArguments()
val outputPath = getPath(output!!)
log("Compiling ${arguments.freeArgs} => [${outputPath}]");
val exitCode = compiler.exec(MessageCollectorPlainTextToStream.PLAIN_TEXT_TO_SYSTEM_ERR, config.Services.EMPTY, arguments)
if (exitCode != ExitCode.OK) {
throw BuildException("Compilation finished with exit code $exitCode")
}
}
}

View File

@@ -0,0 +1,15 @@
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- http://evgeny-goldin.org/javadoc/ant/Types/antlib.html -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<antlib>
<taskdef
name = "kotlinc"
classname = "org.jetbrains.jet.buildtools.ant.Kotlin2JvmTask"/>
<taskdef
name = "kotlin2js"
classname = "org.jetbrains.jet.buildtools.ant.Kotlin2JsTask"/>
<typedef
name = "withKotlin"
classname = "org.jetbrains.jet.buildtools.ant.KotlinCompilerAdapter"/>
</antlib>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/core/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/ant/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="cli" />
<orderEntry type="library" name="idea-full" level="project" />
<orderEntry type="module" module-name="frontend" />
<orderEntry type="module" module-name="backend" />
<orderEntry type="module" module-name="util" />
<orderEntry type="library" name="ant-1.7" level="project" />
</component>
</module>

930
build.xml

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.jetbrains.kotlin.android.tests"
package="org.jetbrains.jet.compiler.android"
android:versionCode="1"
android:versionName="1.0">
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
@@ -12,6 +16,6 @@
"adb shell am instrument -w com.example.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="org.jetbrains.kotlin.android.tests"
android:label="Tests for org.jetbrains.kotlin.android.tests"/>
android:targetPackage="org.jetbrains.jet.compiler.android"
android:label="Tests for org.jetbrains.jet.compiler.android"/>
</manifest>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,14 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler.android;
import junit.framework.TestCase;
import java.lang.String;
import java.lang.reflect.Method;
public class AbstractCodegenTestCaseOnAndroid extends TestCase {
protected void invokeBoxMethod(String filePath, String expectedResult) throws Exception {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler.android;
import android.app.Activity;
import android.os.Bundle;
@@ -24,4 +24,4 @@ public class MyActivity extends Activity {
super.onCreate(savedInstanceState);
System.out.println(R.string.app_name);
}
}
}

View File

@@ -13,8 +13,9 @@
<orderEntry type="module" module-name="frontend" />
<orderEntry type="module" module-name="backend" />
<orderEntry type="library" name="jps-test" level="project" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="generators" scope="TEST" />
<orderEntry type="library" name="idea-full" level="project" />
<orderEntry type="module" module-name="util" />
</component>
</module>
</module>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,17 +14,16 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler;
import com.intellij.util.PlatformUtils;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.android.tests.ant.AntRunner;
import org.jetbrains.kotlin.android.tests.download.SDKDownloader;
import org.jetbrains.kotlin.android.tests.emulator.Emulator;
import org.jetbrains.kotlin.android.tests.run.PermissionManager;
import org.jetbrains.jet.compiler.ant.AntRunner;
import org.jetbrains.jet.compiler.download.SDKDownloader;
import org.jetbrains.jet.compiler.emulator.Emulator;
import org.jetbrains.jet.compiler.run.PermissionManager;
import org.junit.Assert;
import java.io.File;
@@ -105,18 +104,18 @@ public class CodegenTestsOnAndroidRunner {
/*
Output example:
[exec] Error in testKt344:
[exec] java.lang.RuntimeException: File: compiler\testData\codegen\boxWithStdlib\regressions\kt344.kt
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:38)
[exec] at org.jetbrains.kotlin.android.tests.CodegenTestCaseOnAndroid.testKt344(CodegenTestCaseOnAndroid.java:595)
[exec] java.lang.RuntimeException: File: compiler\testData\codegen\regressions\kt344.jet
[exec] at org.jetbrains.jet.compiler.android.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:38)
[exec] at org.jetbrains.jet.compiler.android.CodegenTestCaseOnAndroid.testKt344(CodegenTestCaseOnAndroid.java:595)
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
[exec] Caused by: java.lang.reflect.InvocationTargetException
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35)
[exec] at org.jetbrains.jet.compiler.android.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35)
[exec] ... 13 more
[exec] Caused by: java.lang.VerifyError: compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage$t6$foo$1
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.kt:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.kt:185)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.jet:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.jet:185)
[exec] ... 16 more
[exec] ...............
[exec] Error in testKt529:
@@ -180,13 +179,11 @@ public class CodegenTestsOnAndroidRunner {
downloader.downloadAll();
downloader.unzipAll();
String platformPrefixProperty = System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, "Idea");
PermissionManager.setPermissions(pathManager);
antRunner.packLibraries();
try {
PermissionManager.setPermissions(pathManager);
antRunner.packLibraries();
emulator.createEmulator();
emulator.startEmulator();
@@ -210,12 +207,6 @@ public class CodegenTestsOnAndroidRunner {
throw e;
}
finally {
if (platformPrefixProperty != null) {
System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, platformPrefixProperty);
}
else {
System.clearProperty(PlatformUtils.PLATFORM_PREFIX_KEY);
}
emulator.finishEmulatorProcesses();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,14 +14,18 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.android.tests.run.RunResult;
import org.jetbrains.jet.compiler.run.RunUtils;
import org.jetbrains.jet.compiler.run.result.RunResult;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class OutputUtils {
private final static Pattern EMULATOR_PROCESS_PATTERN = Pattern.compile("\\w*[\\s]+([0-9]*) .* java .* emulator .*");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,10 +14,11 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler;
import java.io.File;
public class PathManager {
private final String tmpFolder;

View File

@@ -0,0 +1,41 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.compiler;
import java.lang.InterruptedException;
import java.lang.RuntimeException;
import java.lang.Thread;
public class ThreadUtils {
public static void wait(Thread thread, int seconds) {
try {
thread.wait(seconds * 1000);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
public static void sleep(int seconds) {
try {
Thread.sleep(seconds * 1000);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,19 +14,20 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.ant;
package org.jetbrains.jet.compiler.ant;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.kotlin.android.tests.OutputUtils;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.run.RunResult;
import org.jetbrains.kotlin.android.tests.run.RunUtils;
import org.jetbrains.kotlin.utils.UtilsPackage;
import org.jetbrains.jet.compiler.OutputUtils;
import org.jetbrains.jet.compiler.PathManager;
import org.jetbrains.jet.compiler.ThreadUtils;
import org.jetbrains.jet.compiler.run.RunUtils;
import org.jetbrains.jet.compiler.run.result.RunResult;
import java.util.ArrayList;
import java.util.List;
public class AntRunner {
private final List<String> listOfAntCommands;
@@ -86,12 +87,7 @@ public class AntRunner {
private static boolean isInstallSuccessful(String output) {
if (output.contains("Is the system running?")) {
System.out.println("Device not ready. Waiting for 20 sec.");
try {
Thread.sleep(20000);
}
catch (InterruptedException e) {
throw UtilsPackage.rethrow(e);
}
ThreadUtils.sleep(20);
return false;
}
return true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,12 +14,12 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.download;
package org.jetbrains.jet.compiler.download;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.run.RunUtils;
import org.jetbrains.jet.compiler.PathManager;
import org.jetbrains.jet.compiler.run.RunUtils;
import java.io.*;
import java.net.URL;
@@ -27,6 +27,7 @@ import java.net.URLConnection;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class SDKDownloader {
private final String platformZipPath;
private final String systemImages;
@@ -38,11 +39,11 @@ public class SDKDownloader {
public SDKDownloader(PathManager pathManager) {
this.pathManager = pathManager;
this.platformZipPath = pathManager.getRootForDownload() + "/platforms.zip";
this.systemImages = pathManager.getRootForDownload() + "/system-images.zip";
this.platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools.zip";
this.toolsZipPath = pathManager.getRootForDownload() + "/tools.zip";
this.antZipPath = pathManager.getRootForDownload() + "/apache-ant-1.8.0.zip";
platformZipPath = pathManager.getRootForDownload() + "/platforms.zip";
systemImages = pathManager.getRootForDownload() + "/system-images.zip";
platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools.zip";
toolsZipPath = pathManager.getRootForDownload() + "/tools.zip";
antZipPath = pathManager.getRootForDownload() + "/apache-ant-1.8.0.zip";
}
public void downloadPlatform() {
@@ -115,12 +116,12 @@ public class SDKDownloader {
delete(antZipPath);
}
private static void download(String urlString, String output) {
protected void download(String urlString, String output) {
System.out.println("Start downloading: " + urlString + " to " + output);
OutputStream outStream = null;
URLConnection urlConnection;
URLConnection urlConnection = null;
InputStream is;
InputStream is = null;
try {
URL Url;
byte[] buf;
@@ -170,7 +171,7 @@ public class SDKDownloader {
}
try {
byte[] buf = new byte[1024];
ZipInputStream zipinputstream;
ZipInputStream zipinputstream = null;
ZipEntry zipentry;
zipinputstream = new ZipInputStream(new FileInputStream(pathToFile));
@@ -221,8 +222,9 @@ public class SDKDownloader {
System.out.println("Finish unzipping: " + pathToFile + " to " + outputFolder);
}
private static void delete(String filePath) {
new File(filePath).delete();
protected void delete(String filePath) {
File file = new File(filePath);
file.delete();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,21 +14,23 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.emulator;
package org.jetbrains.jet.compiler.emulator;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.android.tests.OutputUtils;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.run.RunResult;
import org.jetbrains.kotlin.android.tests.run.RunUtils;
import org.jetbrains.jet.compiler.OutputUtils;
import org.jetbrains.jet.compiler.PathManager;
import org.jetbrains.jet.compiler.ThreadUtils;
import org.jetbrains.jet.compiler.run.RunUtils;
import org.jetbrains.jet.compiler.run.result.RunResult;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Emulator {
private final static Pattern EMULATOR_PATTERN = Pattern.compile("emulator-([0-9])*");
@@ -83,7 +85,7 @@ public class Emulator {
}
@Nullable
private static GeneralCommandLine getStopCommand() {
private GeneralCommandLine getStopCommand() {
if (SystemInfo.isWindows) {
GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath("taskkill");
@@ -141,7 +143,7 @@ public class Emulator {
}
//Only for Unix
private static void stopDdmsProcess() {
private void stopDdmsProcess() {
if (SystemInfo.isUnix) {
GeneralCommandLine listOfEmulatorProcess = new GeneralCommandLine();
listOfEmulatorProcess.setExePath("sh");
@@ -167,7 +169,7 @@ public class Emulator {
}
//Only for Unix
private static void finishProcess(String processName) {
private void finishProcess(String processName) {
if (SystemInfo.isUnix) {
GeneralCommandLine pidOfProcess = new GeneralCommandLine();
pidOfProcess.setExePath("pidof");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,11 +14,12 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.run;
package org.jetbrains.jet.compiler.run;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.jet.compiler.PathManager;
public class PermissionManager {
private PermissionManager() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.run;
package org.jetbrains.jet.compiler.run;
import com.google.common.base.Charsets;
import com.intellij.execution.ExecutionException;
@@ -24,16 +24,20 @@ import com.intellij.execution.process.ProcessAdapter;
import com.intellij.execution.process.ProcessEvent;
import com.intellij.execution.process.ProcessOutputTypes;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.android.tests.OutputUtils;
import org.jetbrains.jet.compiler.OutputUtils;
import org.jetbrains.jet.compiler.ThreadUtils;
import org.jetbrains.jet.compiler.run.result.RunResult;
import java.io.Closeable;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
public class RunUtils {
private RunUtils() {
}
@@ -82,12 +86,12 @@ public class RunUtils {
}
public static RunResult execute(@NotNull RunSettings settings) {
assert settings.waitForEnd : "Use executeOnSeparateThread() instead";
assert settings.waitForEnd == true : "Use executeOnSeparateThread() instead";
return run(settings);
}
public static void executeOnSeparateThread(@NotNull final RunSettings settings) {
assert !settings.waitForEnd : "Use execute() instead";
assert settings.waitForEnd == false : "Use execute() instead";
Thread t = new Thread(new Runnable() {
@Override
public void run() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,14 +14,15 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.run;
package org.jetbrains.jet.compiler.run.result;
public class RunResult {
private final boolean status;
private final String output;
public RunResult(boolean ok, String output) {
this.status = ok;
status = ok;
this.output = output;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler.android;
import org.jetbrains.jps.builders.JpsBuildTestCase;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,18 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler.android;
import com.google.common.io.Files;
import com.intellij.openapi.util.io.FileUtil;
import junit.framework.TestSuite;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.compiler.CodegenTestsOnAndroidRunner;
import org.jetbrains.jet.compiler.PathManager;
import java.io.File;
public class AndroidRunner extends TestSuite {
private static PathManager pathManager;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
package org.jetbrains.jet.compiler.android;
import com.google.common.collect.Lists;
import com.intellij.openapi.util.io.FileUtil;
@@ -22,34 +22,33 @@ import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.UsefulTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.backend.common.output.OutputFileCollection;
import org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsPackage;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.codegen.CodegenTestFiles;
import org.jetbrains.kotlin.codegen.GenerationUtils;
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.kotlin.generators.tests.generator.TestGeneratorUtil;
import org.jetbrains.kotlin.idea.JetFileType;
import org.jetbrains.kotlin.psi.JetFile;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.JetTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.Printer;
import org.jetbrains.jet.ConfigurationKind;
import org.jetbrains.jet.JetTestUtils;
import org.jetbrains.jet.OutputFileCollection;
import org.jetbrains.jet.cli.common.output.outputUtils.OutputUtilsPackage;
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
import org.jetbrains.jet.codegen.CodegenTestFiles;
import org.jetbrains.jet.codegen.GenerationUtils;
import org.jetbrains.jet.compiler.PathManager;
import org.jetbrains.jet.generators.tests.generator.TestGeneratorUtil;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.plugin.JetFileType;
import org.jetbrains.jet.utils.Printer;
import org.junit.Assert;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
private final PathManager pathManager;
private static final String testClassPackage = "org.jetbrains.kotlin.android.tests";
private static final String testClassPackage = "org.jetbrains.jet.compiler.android";
private static final String testClassName = "CodegenTestCaseOnAndroid";
private static final String baseTestClassPackage = "org.jetbrains.kotlin.android.tests";
private static final String baseTestClassPackage = "org.jetbrains.jet.compiler.android";
private static final String baseTestClassName = "AbstractCodegenTestCaseOnAndroid";
private static final String generatorName = "CodegenTestsOnAndroidGenerator";
@@ -71,8 +70,8 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
}
private void prepareAndroidModule() throws IOException {
System.out.println("Copying kotlin-runtime.jar and kotlin-reflect.jar in android module...");
copyKotlinRuntimeJars();
System.out.println("Copying kotlin-runtime.jar in android module...");
copyKotlinRuntimeJar();
System.out.println("Check \"libs\" folder in tested android module...");
File libsFolderInTestedModule = new File(pathManager.getLibsFolderInAndroidTestedModuleTmpFolder());
@@ -81,15 +80,12 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
}
}
private void copyKotlinRuntimeJars() throws IOException {
FileUtil.copy(
ForTestCompileRuntime.runtimeJarForTests(),
new File(pathManager.getLibsFolderInAndroidTmpFolder() + "/kotlin-runtime.jar")
);
FileUtil.copy(
ForTestCompileRuntime.reflectJarForTests(),
new File(pathManager.getLibsFolderInAndroidTmpFolder() + "/kotlin-reflect.jar")
);
private void copyKotlinRuntimeJar() throws IOException {
File kotlinRuntimeJar = new File(pathManager.getLibsFolderInAndroidTmpFolder() + "/kotlin-runtime.jar");
File kotlinRuntimeInDist = new File("dist/kotlinc/lib/kotlin-runtime.jar");
Assert.assertTrue("kotlin-runtime.jar in dist/kotlnc/lib/ doesn't exists. Run dist ant task before generating test for android.",
kotlinRuntimeInDist.exists());
FileUtil.copy(kotlinRuntimeInDist, kotlinRuntimeJar);
}
private void generateAndSave() throws Throwable {
@@ -97,7 +93,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
StringBuilder out = new StringBuilder();
Printer p = new Printer(out);
p.print(FileUtil.loadFile(new File("license/LICENSE.txt")));
p.print(FileUtil.loadFile(new File("injector-generator/copyright.txt")));
p.println("package " + testClassPackage + ";");
p.println();
p.println("import ", baseTestClassPackage, ".", baseTestClassName, ";");
@@ -106,7 +102,8 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
p.println("public class ", testClassName, " extends ", baseTestClassName, " {");
p.pushIndent();
generateTestMethodsForDirectories(p, new File("compiler/testData/codegen/box"), new File("compiler/testData/codegen/boxWithStdlib"));
File testDataSources = new File("compiler/testData/codegen/");
generateTestMethodsForDirectory(p, testDataSources);
p.popIndent();
p.println("}");
@@ -116,15 +113,12 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
FileUtil.writeToFile(new File(testSourceFilePath), out.toString());
}
private void generateTestMethodsForDirectories(Printer p, File... dirs) throws IOException {
FilesWriter holderMock = new FilesWriter(false);
private void generateTestMethodsForDirectory(Printer p, File dir) throws IOException {
File[] files = dir.listFiles();
Assert.assertNotNull("Folder with testData is empty: " + dir.getAbsolutePath(), files);
FilesWriter holderFull = new FilesWriter(true);
for (File dir : dirs) {
File[] files = dir.listFiles();
Assert.assertNotNull("Folder with testData is empty: " + dir.getAbsolutePath(), files);
processFiles(p, files, holderFull, holderMock);
}
FilesWriter holderMock = new FilesWriter(false);
processFiles(p, files, holderFull, holderMock);
holderFull.writeFilesOnDisk();
holderMock.writeFilesOnDisk();
@@ -134,21 +128,17 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
private final boolean isFullJdk;
public List<JetFile> files = new ArrayList<JetFile>();
private KotlinCoreEnvironment environment;
private JetCoreEnvironment environment;
private FilesWriter(boolean isFullJdk) {
this.isFullJdk = isFullJdk;
environment = createEnvironment(isFullJdk);
}
private KotlinCoreEnvironment createEnvironment(boolean isFullJdk) {
return isFullJdk ?
JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
myTestRootDisposable, ConfigurationKind.ALL, TestJdkKind.FULL_JDK
) :
JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(
myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS
);
private JetCoreEnvironment createEnvironment(boolean isFullJdk) {
return isFullJdk
? JetTestUtils.createEnvironmentWithFullJdk(myTestRootDisposable)
: JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS);
}
public boolean shouldWriteFilesOnDisk() {
@@ -220,7 +210,7 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
String packageName = file.getPath().replaceAll("\\\\|-|\\.|/", "_");
text = changePackage(packageName, text);
if (!file.getCanonicalPath().contains("boxWithStdlib")) {
if (SpecialFiles.getFilesCompiledWithoutStdLib().contains(file.getName())) {
CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderMock.environment.getProject());
holderMock.files.add(codegenFile.getPsiFile());
}

View File

@@ -0,0 +1,98 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.compiler.android;
import com.google.common.collect.Sets;
import java.util.Set;
public class SpecialFiles {
private static final Set<String> excludedFiles = Sets.newHashSet();
private static final Set<String> filesCompiledWithoutStdLib = Sets.newHashSet();
static {
fillExcludedFiles();
fillFilesCompiledWithoutStdLib();
}
public static Set<String> getExcludedFiles() {
return excludedFiles;
}
public static Set<String> getFilesCompiledWithoutStdLib() {
return filesCompiledWithoutStdLib;
}
private static void fillFilesCompiledWithoutStdLib() {
filesCompiledWithoutStdLib.add("kt1980.kt");
filesCompiledWithoutStdLib.add("kt1953_class.kt"); // Exception in code
filesCompiledWithoutStdLib.add("basicmethodSuperClass.kt"); // Exception in code
filesCompiledWithoutStdLib.add("kt503.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt504.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt772.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt773.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt796_797.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt950.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt3190.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt4265.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("realStringRepeat.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
filesCompiledWithoutStdLib.add("kt2395.kt"); // With MOCK_JDK
filesCompiledWithoutStdLib.add("useAnonymousObjectAsIterator.kt"); // OVERLOAD_RESOLUTION_AMBIGUITY
}
private static void fillExcludedFiles() {
excludedFiles.add("boxAgainstJava"); // Must compile Java files before
excludedFiles.add("boxWithJava"); // Must compile Java files before
excludedFiles.add("boxMultiFile"); // MultiFileTest not supported yet
excludedFiles.add("boxInline"); // MultiFileTest not supported yet
excludedFiles.add("reflection");
excludedFiles.add("kt3238.kt"); // Reflection
excludedFiles.add("kt1482_2279.kt"); // Reflection
excludedFiles.add("nestedInPackage.kt"); // Cannot change package name
excludedFiles.add("importNestedClass.kt"); // Cannot change package name
excludedFiles.add("packageQualifiedMethod.kt"); // Cannot change package name
excludedFiles.add("classObjectToString.kt"); // Cannot change package name
excludedFiles.add("invokeOnClassObjectOfNestedClass2.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum1.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum2.kt"); // Cannot change package name
excludedFiles.add("kt326.kt"); // Commented
excludedFiles.add("kt1213.kt"); // Commented
excludedFiles.add("kt684.kt"); // StackOverflow with StringBuilder (escape())
excludedFiles.add("kt529.kt"); // Bug
excludedFiles.add("kt344.kt"); // Bug
excludedFiles.add("comparisonWithNullCallsFun.kt"); // java.lang.NoClassDefFoundError: jet.Nothing
excludedFiles.add("kt3574.kt"); // java.lang.NoClassDefFoundError: jet.Nothing
excludedFiles.add("genericBackingFieldSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("genericMethodSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("classpath.kt"); // Some classes are not visible on android
excludedFiles.add("manyNumbers.kt"); // Out of memory
}
private SpecialFiles() {
}
}

View File

@@ -1,77 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests;
import com.google.common.collect.Sets;
import java.util.Set;
public class SpecialFiles {
private static final Set<String> excludedFiles = Sets.newHashSet();
private static final Set<String> filesCompiledWithoutStdLib = Sets.newHashSet();
static {
fillExcludedFiles();
}
public static Set<String> getExcludedFiles() {
return excludedFiles;
}
private static void fillExcludedFiles() {
excludedFiles.add("native"); // Reflection is used to check full class name
excludedFiles.add("reflection");
excludedFiles.add("kt3238.kt"); // Reflection
excludedFiles.add("kt1482_2279.kt"); // Reflection
excludedFiles.add("nestedInPackage.kt"); // Cannot change package name
excludedFiles.add("importNestedClass.kt"); // Cannot change package name
excludedFiles.add("packageQualifiedMethod.kt"); // Cannot change package name
excludedFiles.add("classObjectToString.kt"); // Cannot change package name
excludedFiles.add("invokeOnClassObjectOfNestedClass2.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum1.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum2.kt"); // Cannot change package name
excludedFiles.add("sortEnumEntries.kt"); // Cannot change package name
excludedFiles.add("assertionStackTrace.kt"); // Cannot change package name
excludedFiles.add("anonymousObjectReifiedSupertype.kt"); // Cannot change package name
excludedFiles.add("innerAnonymousObject.kt"); // Cannot change package name
excludedFiles.add("nestedReifiedSignature.kt"); // Cannot change package name
excludedFiles.add("recursiveInnerAnonymousObject.kt"); // Cannot change package name
excludedFiles.add("kt684.kt"); // StackOverflow with StringBuilder (escape())
excludedFiles.add("kt529.kt"); // Bug
excludedFiles.add("kt344.kt"); // Bug
excludedFiles.add("comparisonWithNullCallsFun.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
excludedFiles.add("kt3574.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
excludedFiles.add("genericBackingFieldSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("genericMethodSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("classpath.kt"); // Some classes are not visible on android
excludedFiles.add("manyNumbers.kt"); // Out of memory
excludedFiles.add("smap"); // Line numbers
}
private SpecialFiles() {
}
}

View File

@@ -7,8 +7,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="intellij-core" level="project" />
<orderEntry type="module" module-name="frontend" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="frontend" />
<orderEntry type="library" name="intellij-core" level="project" />
</component>
</module>
</module>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.backend.common.bridges
package org.jetbrains.jet.codegen.bridges
import org.jetbrains.kotlin.utils.DFS
import org.jetbrains.jet.utils.DFS
import java.util.HashSet
public trait FunctionHandle {
@@ -87,7 +87,7 @@ private fun <Function : FunctionHandle> findAllReachableDeclarations(function: F
* The implementation is guaranteed to exist because if it wouldn't, the given function would've been abstract
*/
private fun <Function : FunctionHandle> findConcreteSuperDeclaration(function: Function): Function {
require(!function.isAbstract, { "Only concrete functions have implementations: $function" })
require(!function.isAbstract, "Only concrete functions have implementations: $function")
if (function.isDeclaration) return function
@@ -109,7 +109,7 @@ private fun <Function : FunctionHandle> findConcreteSuperDeclaration(function: F
result.removeAll(toRemove)
val concreteRelevantDeclarations = result.filter { !it.isAbstract }
if (concreteRelevantDeclarations.size() != 1) {
if (concreteRelevantDeclarations.size != 1) {
error("Concrete fake override $function should have exactly one concrete super-declaration: $concreteRelevantDeclarations")
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.backend.common.bridges
package org.jetbrains.jet.codegen.bridges
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.resolve.DescriptorUtils
import org.jetbrains.kotlin.resolve.OverrideResolver
import org.jetbrains.kotlin.resolve.calls.CallResolverUtil
import org.jetbrains.kotlin.types.TypeUtils
import org.jetbrains.jet.lang.descriptors.*
import org.jetbrains.jet.lang.resolve.DescriptorUtils
import org.jetbrains.jet.lang.resolve.OverrideResolver
import org.jetbrains.jet.lang.resolve.calls.CallResolverUtil
import org.jetbrains.jet.lang.types.TypeUtils
public fun <Signature> generateBridgesForFunctionDescriptor(
descriptor: FunctionDescriptor,
@@ -47,7 +47,7 @@ public fun <Signature> generateBridgesForFunctionDescriptor(
* eases the process of determining what bridges are already generated in our supertypes and need to be inherited, not regenerated.
*/
private data class DescriptorBasedFunctionHandle(val descriptor: FunctionDescriptor) : FunctionHandle {
private val overridden = descriptor.getOverriddenDescriptors().map { DescriptorBasedFunctionHandle(it.getOriginal()) }
private val _overridden = descriptor.getOverriddenDescriptors().map { DescriptorBasedFunctionHandle(it.getOriginal()) }
override val isDeclaration: Boolean =
descriptor.getKind().isReal() ||
@@ -57,7 +57,7 @@ private data class DescriptorBasedFunctionHandle(val descriptor: FunctionDescrip
descriptor.getModality() == Modality.ABSTRACT ||
DescriptorUtils.isTrait(descriptor.getContainingDeclaration())
override fun getOverridden() = overridden
override fun getOverridden() = _overridden
}

View File

@@ -0,0 +1,205 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.backend.common;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.codegen.bridges.BridgesPackage;
import org.jetbrains.jet.lang.descriptors.*;
import org.jetbrains.jet.lang.psi.JetDelegationSpecifier;
import org.jetbrains.jet.lang.psi.JetExpression;
import org.jetbrains.jet.lang.psi.JetSimpleNameExpression;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.calls.CallResolverUtil;
import org.jetbrains.jet.lang.resolve.calls.callUtil.CallUtilPackage;
import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall;
import org.jetbrains.jet.lang.resolve.name.Name;
import org.jetbrains.jet.lang.types.JetType;
import org.jetbrains.jet.lang.types.TypeUtils;
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import java.util.*;
/**
* Backend-independent utility class.
*/
public class CodegenUtil {
private CodegenUtil() {
}
// TODO: consider putting predefined method signatures here too.
public static final String EQUALS_METHOD_NAME = "equals";
public static final String TO_STRING_METHOD_NAME = "toString";
public static final String HASH_CODE_METHOD_NAME = "hashCode";
@Nullable
public static FunctionDescriptor getDeclaredFunctionByRawSignature(
@NotNull ClassDescriptor owner,
@NotNull Name name,
@NotNull ClassifierDescriptor returnedClassifier,
@NotNull ClassifierDescriptor... valueParameterClassifiers
) {
Collection<FunctionDescriptor> functions = owner.getDefaultType().getMemberScope().getFunctions(name);
for (FunctionDescriptor function : functions) {
if (!CallResolverUtil.isOrOverridesSynthesized(function)
&& function.getTypeParameters().isEmpty()
&& valueParameterClassesMatch(function.getValueParameters(), Arrays.asList(valueParameterClassifiers))
&& rawTypeMatches(function.getReturnType(), returnedClassifier)) {
return function;
}
}
return null;
}
public static FunctionDescriptor getAnyEqualsMethod() {
ClassDescriptor anyClass = KotlinBuiltIns.getInstance().getAny();
FunctionDescriptor function =
getDeclaredFunctionByRawSignature(anyClass, Name.identifier(EQUALS_METHOD_NAME),
KotlinBuiltIns.getInstance().getBoolean(),
anyClass);
assert function != null;
return function;
}
public static FunctionDescriptor getAnyToStringMethod() {
ClassDescriptor anyClass = KotlinBuiltIns.getInstance().getAny();
FunctionDescriptor function =
getDeclaredFunctionByRawSignature(anyClass, Name.identifier(TO_STRING_METHOD_NAME),
KotlinBuiltIns.getInstance().getString());
assert function != null;
return function;
}
public static FunctionDescriptor getAnyHashCodeMethod() {
ClassDescriptor anyClass = KotlinBuiltIns.getInstance().getAny();
FunctionDescriptor function =
getDeclaredFunctionByRawSignature(anyClass, Name.identifier(HASH_CODE_METHOD_NAME),
KotlinBuiltIns.getInstance().getInt());
assert function != null;
return function;
}
@Nullable
public static PropertyDescriptor getDelegatePropertyIfAny(JetExpression expression, ClassDescriptor classDescriptor, BindingContext bindingContext) {
PropertyDescriptor propertyDescriptor = null;
if (expression instanceof JetSimpleNameExpression) {
ResolvedCall<?> call = CallUtilPackage.getResolvedCall(expression, bindingContext);
if (call != null) {
CallableDescriptor callResultingDescriptor = call.getResultingDescriptor();
if (callResultingDescriptor instanceof ValueParameterDescriptor) {
ValueParameterDescriptor valueParameterDescriptor = (ValueParameterDescriptor) callResultingDescriptor;
// constructor parameter
if (valueParameterDescriptor.getContainingDeclaration() instanceof ConstructorDescriptor) {
// constructor of my class
if (valueParameterDescriptor.getContainingDeclaration().getContainingDeclaration() == classDescriptor) {
propertyDescriptor = bindingContext.get(BindingContext.VALUE_PARAMETER_AS_PROPERTY, valueParameterDescriptor);
}
}
}
// todo: when and if frontend will allow properties defined not as constructor parameters to be used in delegation specifier
}
}
return propertyDescriptor;
}
public static boolean isFinalPropertyWithBackingField(PropertyDescriptor propertyDescriptor, BindingContext bindingContext) {
return propertyDescriptor != null &&
!propertyDescriptor.isVar() &&
Boolean.TRUE.equals(bindingContext.get(BindingContext.BACKING_FIELD_REQUIRED, propertyDescriptor));
}
@NotNull
public static Map<FunctionDescriptor, FunctionDescriptor> getTraitMethods(ClassDescriptor descriptor) {
Map<FunctionDescriptor, FunctionDescriptor> result = new LinkedHashMap<FunctionDescriptor, FunctionDescriptor>();
for (DeclarationDescriptor declaration : descriptor.getDefaultType().getMemberScope().getAllDescriptors()) {
if (!(declaration instanceof CallableMemberDescriptor)) continue;
CallableMemberDescriptor inheritedMember = (CallableMemberDescriptor) declaration;
CallableMemberDescriptor traitMember = BridgesPackage.findTraitImplementation(inheritedMember);
if (traitMember == null) continue;
assert traitMember.getModality() != Modality.ABSTRACT : "Cannot delegate to abstract trait method: " + inheritedMember;
// inheritedMember can be abstract here. In order for FunctionCodegen to generate the method body, we're creating a copy here
// with traitMember's modality
CallableMemberDescriptor copy =
inheritedMember.copy(inheritedMember.getContainingDeclaration(), traitMember.getModality(), Visibilities.PUBLIC,
CallableMemberDescriptor.Kind.DECLARATION, true);
if (traitMember instanceof SimpleFunctionDescriptor) {
result.put((FunctionDescriptor) traitMember, (FunctionDescriptor) copy);
}
else if (traitMember instanceof PropertyDescriptor) {
for (PropertyAccessorDescriptor traitAccessor : ((PropertyDescriptor) traitMember).getAccessors()) {
for (PropertyAccessorDescriptor inheritedAccessor : ((PropertyDescriptor) copy).getAccessors()) {
if (inheritedAccessor.getClass() == traitAccessor.getClass()) { // same accessor kind
result.put(traitAccessor, inheritedAccessor);
}
}
}
}
}
return result;
}
@NotNull
public static ClassDescriptor getSuperClassByDelegationSpecifier(@NotNull JetDelegationSpecifier specifier, @NotNull BindingContext bindingContext) {
JetType superType = bindingContext.get(BindingContext.TYPE, specifier.getTypeReference());
assert superType != null : "superType should not be null: " + specifier.getText();
ClassDescriptor superClassDescriptor = (ClassDescriptor) superType.getConstructor().getDeclarationDescriptor();
assert superClassDescriptor != null : "superClassDescriptor should not be null: " + specifier.getText();
return superClassDescriptor;
}
private static boolean valueParameterClassesMatch(
@NotNull List<ValueParameterDescriptor> parameters,
@NotNull List<ClassifierDescriptor> classifiers
) {
if (parameters.size() != classifiers.size()) return false;
for (int i = 0; i < parameters.size(); i++) {
ValueParameterDescriptor parameterDescriptor = parameters.get(i);
ClassifierDescriptor classDescriptor = classifiers.get(i);
if (!rawTypeMatches(parameterDescriptor.getType(), classDescriptor)) {
return false;
}
}
return true;
}
private static boolean rawTypeMatches(JetType type, ClassifierDescriptor classifier) {
return type.getConstructor().equals(classifier.getTypeConstructor());
}
public static boolean isEnumValueOfMethod(@NotNull FunctionDescriptor functionDescriptor) {
List<ValueParameterDescriptor> methodTypeParameters = functionDescriptor.getValueParameters();
JetType nullableString = TypeUtils.makeNullable(KotlinBuiltIns.getInstance().getStringType());
return DescriptorUtils.ENUM_VALUE_OF.equals(functionDescriptor.getName())
&& methodTypeParameters.size() == 1
&& JetTypeChecker.DEFAULT.isSubtypeOf(methodTypeParameters.get(0).getType(), nullableString);
}
public static boolean isEnumValuesMethod(@NotNull FunctionDescriptor functionDescriptor) {
List<ValueParameterDescriptor> methodTypeParameters = functionDescriptor.getValueParameters();
return DescriptorUtils.ENUM_VALUES.equals(functionDescriptor.getName())
&& methodTypeParameters.isEmpty();
}
}

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.backend.common
import org.jetbrains.jet.lang.descriptors.CallableMemberDescriptor
import org.jetbrains.jet.lang.descriptors.ClassDescriptor
import org.jetbrains.jet.lang.types.JetType
import kotlin.platform.platformStatic
import org.jetbrains.jet.lang.descriptors.CallableDescriptor
import org.jetbrains.jet.utils.keysToMapExceptNulls
import org.jetbrains.jet.lang.resolve.DescriptorUtils
public object CodegenUtilKt {
// class Foo : Bar by baz
// descriptor = Foo
// toTrait = Bar
// delegateExpressionType = typeof(baz)
// return Map<member of Foo, corresponding member of typeOf(baz)>
public [platformStatic] fun getDelegates(
descriptor: ClassDescriptor,
toTrait: ClassDescriptor,
delegateExpressionType: JetType? = null
): Map<CallableMemberDescriptor, CallableDescriptor> {
return descriptor.getDefaultType().getMemberScope().getAllDescriptors().stream()
.filterIsInstance(javaClass<CallableMemberDescriptor>())
.filter { it.getKind() == CallableMemberDescriptor.Kind.DELEGATION }
.keysToMapExceptNulls {
delegatingMember ->
val actualDelegates = DescriptorUtils.getAllOverriddenDescriptors(delegatingMember)
.filter { it.getContainingDeclaration() == toTrait }
.map {
overriddenDescriptor ->
val scope = (delegateExpressionType ?: toTrait.getDefaultType()).getMemberScope()
val name = overriddenDescriptor.getName()
// this is the actual member of delegateExpressionType that we are delegating to
(scope.getFunctions(name) + scope.getProperties(name))
.first {
(listOf(it) + DescriptorUtils.getAllOverriddenDescriptors(it)).map { it.getOriginal() }.contains(overriddenDescriptor.getOriginal())
}
}
assert(actualDelegates.size <= 1) { "Meny delegates found for $delegatingMember: $actualDelegates" }
actualDelegates.firstOrNull()
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,24 +14,23 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.backend.common;
package org.jetbrains.jet.backend.common;
import com.google.common.collect.Lists;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.descriptors.*;
import org.jetbrains.kotlin.name.Name;
import org.jetbrains.kotlin.psi.JetClass;
import org.jetbrains.kotlin.psi.JetClassOrObject;
import org.jetbrains.kotlin.psi.JetParameter;
import org.jetbrains.kotlin.resolve.BindingContext;
import org.jetbrains.kotlin.resolve.BindingContextUtils;
import org.jetbrains.kotlin.resolve.OverrideResolver;
import org.jetbrains.jet.lang.descriptors.*;
import org.jetbrains.jet.lang.psi.JetClass;
import org.jetbrains.jet.lang.psi.JetClassOrObject;
import org.jetbrains.jet.lang.psi.JetParameter;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
import org.jetbrains.jet.lang.resolve.OverrideResolver;
import org.jetbrains.jet.lang.resolve.name.Name;
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import java.util.Collections;
import java.util.List;
import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilPackage.getBuiltIns;
/**
* A platform-independent logic for generating data class synthetic methods.
* TODO: data class with zero components gets no toString/equals/hashCode methods. This is inconsistent and should be
@@ -80,10 +79,9 @@ public abstract class DataClassMethodGenerator {
}
private void generateComponentFunctionsForDataClasses() {
ConstructorDescriptor constructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
// primary constructor should exist for data classes
// but when generating light-classes still need to check we have one
if (constructor == null) return;
if (!declaration.hasPrimaryConstructor()) return;
ConstructorDescriptor constructor = classDescriptor.getConstructors().iterator().next();
for (ValueParameterDescriptor parameter : constructor.getValueParameters()) {
FunctionDescriptor function = bindingContext.get(BindingContext.DATA_CLASS_COMPONENT_FUNCTION, parameter);
@@ -101,22 +99,22 @@ public abstract class DataClassMethodGenerator {
}
private void generateDataClassToStringIfNeeded(@NotNull List<PropertyDescriptor> properties) {
ClassDescriptor stringClass = getBuiltIns(classDescriptor).getString();
ClassDescriptor stringClass = KotlinBuiltIns.getInstance().getString();
if (!hasDeclaredNonTrivialMember(CodegenUtil.TO_STRING_METHOD_NAME, stringClass)) {
generateToStringMethod(properties);
}
}
private void generateDataClassHashCodeIfNeeded(@NotNull List<PropertyDescriptor> properties) {
ClassDescriptor intClass = getBuiltIns(classDescriptor).getInt();
ClassDescriptor intClass = KotlinBuiltIns.getInstance().getInt();
if (!hasDeclaredNonTrivialMember(CodegenUtil.HASH_CODE_METHOD_NAME, intClass)) {
generateHashCodeMethod(properties);
}
}
private void generateDataClassEqualsIfNeeded(@NotNull List<PropertyDescriptor> properties) {
ClassDescriptor booleanClass = getBuiltIns(classDescriptor).getBoolean();
ClassDescriptor anyClass = getBuiltIns(classDescriptor).getAny();
ClassDescriptor booleanClass = KotlinBuiltIns.getInstance().getBoolean();
ClassDescriptor anyClass = KotlinBuiltIns.getInstance().getAny();
if (!hasDeclaredNonTrivialMember(CodegenUtil.EQUALS_METHOD_NAME, booleanClass, anyClass)) {
generateEqualsMethod(properties);
}
@@ -163,7 +161,7 @@ public abstract class DataClassMethodGenerator {
for (CallableDescriptor overridden : OverrideResolver.getOverriddenDeclarations(function)) {
if (overridden instanceof CallableMemberDescriptor
&& ((CallableMemberDescriptor) overridden).getKind() == CallableMemberDescriptor.Kind.DECLARATION
&& !overridden.getContainingDeclaration().equals(getBuiltIns(classDescriptor).getAny())) {
&& !overridden.getContainingDeclaration().equals(KotlinBuiltIns.getInstance().getAny())) {
return true;
}
}

Some files were not shown because too many files have changed in this diff Show More