Commit Graph

31823 Commits

Author SHA1 Message Date
Alexander Udalov e5d64d316d Fix kotlin-maven-plugin compilation 2016-05-26 14:14:17 +03:00
Alexander Udalov d89e907f00 Minor, comment out ignored test 2016-05-26 11:48:00 +03:00
Alexander Udalov 159d88102f Use MODULE_NAME configuration key in JS instead of MODULE_ID 2016-05-26 11:47:30 +03:00
Alexander Udalov 05f8836f46 Move some configuration keys to JVM or to CommonConfigurationKeys
Move CONTENT_ROOTS and SCRIPT_DEFINITIONS_KEY to JVMConfigurationKeys because
they are only used on JVM, rename the latter to SCRIPT_DEFINITIONS.

Move MODULE_NAME to CommonConfigurationKeys to be combined with MODULE_ID in
JSConfigurationKeys in the future
2016-05-26 11:47:30 +03:00
Alexander Udalov 6674412079 Rename compilerConfigurationForTests -> newConfiguration 2016-05-26 11:47:30 +03:00
Alexander Udalov d04624cfe9 Minor, refactor KotlinToJVMBytecodeCompiler#compileModules 2016-05-26 11:47:30 +03:00
Alexander Udalov cad4b6973c Introduce and use JSConfigurationKeys similar to JVMConfigurationKeys
Use type-safe keys in CompilerConfiguration instead of multiple parameters,
duplicated in the base class (JsConfig), derived class (LibrarySourcesConfig)
and its builder (LibrarySourcesConfig.Builder)
2016-05-26 11:47:30 +03:00
Alexander Udalov b65980f3b7 Drop JsConfig#inlineEnabled flag
Use CommonConfigurationKeys#DISABLE_INLINE flag (moved from
JVMConfigurationKeys) in CompilerConfiguration instead, similarly to the JVM
compiler
2016-05-26 11:47:30 +03:00
Alexander Udalov 6889bdbef8 Add CompilerConfiguration to JsConfig
Will be used to store common compiler options (such as source version, inline
disabled, etc) as well as JS-specific options, to unify the logic of compiler
option initialization between JS and JVM compilers
2016-05-26 11:47:30 +03:00
Alexander Udalov 116e4a5ced Rename Config -> JsConfig 2016-05-26 11:47:30 +03:00
Alexander Udalov 2bd3211ba8 Get rid of unnecessary exceptions in JS translator
Before this commit, an internal error during JS translation resulted in the
actual exception wrapped in TranslationRuntimeException wrapped in
TranslationInternalException wrapped in RuntimeException being thrown. This
change gets rid of the two latter wrappings.

Also delete unthrown MainFunctionNotFoundException and related unused
constructors in TranslationException
2016-05-26 11:47:30 +03:00
Alexander Udalov 9418311bda Pass CompilerConfiguration to CLICompiler#doExecute
Extract common CompilerConfiguration setup code to a separate method
2016-05-26 11:47:30 +03:00
Alexander Udalov 3c81bb4bfc Add MessageCollector#hasErrors, get rid of MessageSeverityCollector
Also fix duplicated wrapping of a message collector into a message severity
collector (in CLICompiler and in the beginning of doExecute in
K2JVMCompiler/K2JSCompiler)
2016-05-26 11:47:30 +03:00
Alexander Udalov c5e2f55ea7 Get rid of getModuleName(), pass configuration to createContextWithSealedModule
Add KotlinTestUtils.newConfiguration() which creates a configuration and sets
the module name to the default test one ("test-module")
2016-05-26 11:47:30 +03:00
Alexander Udalov 69343549b7 Move TEST_MODULE_NAME to KotlinTestUtils and change value to "test-module"
This name is more generic and thus can be used everywhere, not only in Java
integration tests
2016-05-26 11:47:30 +03:00
Alexander Udalov 3ca77de924 Remove traces of old compiler plugin architecture
It was retired with the deprecation and subsequent removal of the old KDoc, and
is now unused
2016-05-26 11:47:30 +03:00
Alexander Udalov 0fe39a186e Simplify public methods of KotlinToJVMBytecodeCompiler
Pass as much as possible in the single CompilerConfiguration instance instead
of in separate function parameters. Add corresponding keys to
JVMConfigurationKeys.

Re changes in compileModules: since output directory (stored now under the key
OUTPUT_DIRECTORY) is different for each module, the configuration of the whole
project is no longer applicable when compiling individual modules. Thus we copy
the project configuration for each module and add the output directory value
2016-05-26 11:47:30 +03:00
Alexander Udalov 8c0f78db50 Introduce CompilerConfiguration#getNotNull and getBoolean
To reduce boilerplate at call sites
2016-05-26 11:47:30 +03:00
Alexander Udalov 81a0fa5f47 Minor, fix warnings and improve style in KotlinToJVMBytecodeCompiler 2016-05-26 11:47:30 +03:00
Dmitry Jemerov 495a3e9432 cleanup after code review 2016-05-25 21:05:59 +02:00
Dmitry Jemerov b37ac4f783 fix PsiCheckerTestGenerated according to removed "property with backing field" highlighting 2016-05-25 20:10:01 +02:00
Dmitry Jemerov 14559bfae0 inherit Kotlin TYPE_PARAMETER from Java TYPE_PARAMETER
#KT-11465 Fixed
2016-05-25 20:00:49 +02:00
Dmitry Jemerov 76178c531e specify base color for ANNOTATION and LABEL
#KT-9410 Fixed
2016-05-25 20:00:49 +02:00
Dmitry Jemerov 49335fa6eb highlight infix function calls
#KT-6540 Fixed
2016-05-25 20:00:49 +02:00
Dmitry Jemerov a448af5d17 remove CLASS highlight on top of CONSTRUCTOR_CALL for constructor calls
#KT-2919 Fixed
2016-05-25 20:00:49 +02:00
Dmitry Jemerov e7cb256e81 TypeKindHighlightingVisitor: J2K 2016-05-25 20:00:49 +02:00
Dmitry Jemerov e07e16abf6 TypeKindHighlightingVisitor: rename to .kt 2016-05-25 20:00:49 +02:00
Dmitry Jemerov e9cefd9ece remove PARAMETER highlight on top of INSTANCE_PROPERTY for primary constructor parameters 2016-05-25 20:00:49 +02:00
Dmitry Jemerov b51637d49f remove LOCAL_VARIABLE highlight on top of BACKING_FIELD_VARIABLE 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 4261e4a5cc VariablesHighlightingVisitor: cleanup after J2K 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 77a48c1d10 VariablesHighlightingVisitor: J2K 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 4ddbe9828a VariablesHighlightingVisitor: rename to .kt 2016-05-25 20:00:49 +02:00
Dmitry Jemerov c7cd86f1ed PropertiesHighlightingVisitor: cleanup after J2K, remove "property has backing field" highlighting, don't layer other highlights 2016-05-25 20:00:49 +02:00
Dmitry Jemerov b76585e03f PropertiesHighlightingVisitor: j2K 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 41cd55b281 PropertiesHighlightingVisitor: rename to .kt 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 5512043ed4 FunctionsHighlightingVisitor: cleanup after J2K, remove overlaid highlighting of function calls 2016-05-25 20:00:49 +02:00
Dmitry Jemerov c515740e38 FunctionsHighlightingVisitor: J2K 2016-05-25 20:00:49 +02:00
Dmitry Jemerov 83b5028ac2 FunctionsHighlightingVisitor: rename to .kt 2016-05-25 20:00:49 +02:00
Ilya Gorbunov 9c91b120c9 Force garbage finalization and another gc run in gradle tests. 2016-05-25 17:12:46 +03:00
Dmitry Jemerov 855ddf96fd Kotlin with Gradle: generate 'repositories' call, use kotlin_version property
#KT-11841 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov 636bbd026c test for KT-9454 2016-05-25 15:41:25 +02:00
Dmitry Jemerov ccbb3d055b call BuildManager.clearState(project) in apply() method of Kotlin Compiler Settings configurable
#KT-10255 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov 1865750606 add icon for Kotlin annotation classes
#KT-11814 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov 22d378997c always show current plugin version in update check dialog
#KT-12076 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov b8eb1dae2b "Configure Kotlin plugin updates" is a dumb-aware action
#KT-12075 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov 83798f54c1 help ID for compiler configuration page
#KT-12110 Fixed
2016-05-25 15:41:25 +02:00
Dmitry Jemerov e920c35883 remove unnecessary ? from 'serr' live template
#KT-12289 Fixed
2016-05-25 15:41:25 +02:00
Stanislav Erokhin 4b9aac6318 Replace not debug usages of DescriptorRenderer.DEBUG_TEXT to DescriptorRenderer.FQ_NAMES_IN_TYPES. 2016-05-25 16:31:34 +03:00
Pavel V. Talanov 710e920df7 lightClassUtils: Fix CCE when trying to obtain KtLightTypeParameter
#KT-12259 Fixed
2016-05-25 15:58:11 +03:00
Pavel V. Talanov 62421bbf7b 'const val' are now considered constants by Java in IDEA
#KT-12026 Fixed
2016-05-25 15:58:09 +03:00