Alexey Andreev
4ff2b62bc0
KT-12864: add Comparable interface to Enum metadata so that RTTI should handle is Comparable case correctly
2016-08-05 16:32:27 +03:00
Michael Bogdanov
67808ef7fc
Disable kt13133 test on android
2016-08-05 14:11:00 +03:00
Nikolay Krasko
300e0acd27
Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
...
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Mikhail Zarechenskiy
95ea191442
Fix handling after ScriptTest execution: clean up temporary files on exit hooks
...
Test "testStandardScriptWithSaving" uses classloader and prevents from
deleting temporary files on windows
2016-08-04 15:19:15 +03:00
Mikhail Zarechenskiy
7679e49b25
Do not generate properties for script parameters if there is template definition
2016-08-04 15:19:15 +03:00
Alexey Tsvetkov
e4226fbe48
Update changelog for 1.0.4
2016-08-04 11:27:08 +03:00
Natalia Ukhorskaya
7087f10660
Fixes after review: get last statement in codeFragmetn using psi instead of findElementAt
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya
ed204e9bac
Minor: extract similar parts to separate function
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya
6a04cd39b2
Debugger: allow to evaluate kotlin expressions in java files
...
#KT-7549 Fixed
If the context is inside PsiJavaFile, get list of all local variables available in current frame (this logic was removed in 29778311e8 01.12.2015 Drop unnecesary logic about additional context for lambda in debugger). For each variable create KtProperty inside top-level KtFunction in KtFile and set it as contextElement for KtCodeFragment. This file should have all imports from PsiJavaFile. We do not create properties on top-level because they will be highlighted as top-level vals/vars.
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya
d823d6f4ab
Debugger tests: mark objects using NodeDescriptorImpl.getMarkup. Primitive values cannot be marked.
2016-08-03 17:51:49 +03:00
Pavel V. Talanov
252b8ec6db
Add assertions to prohibit creating LazyJavaClassDescriptor by KtLightClass
...
Diagnosing KT-12966
2016-08-03 17:29:08 +03:00
Pavel V. Talanov
30892e0154
KtLightClassForDecompiledDeclaration is now marked by KtLightClassMarker
...
Rename: KtJavaMirrorMarker -> KtLightClassMarker
Introduce code to be able to tell light classes from source and binaries apart in 'frontend.java'
2016-08-03 17:29:06 +03:00
Alexey Tsvetkov
d402a15049
Update changelog for 1.0.4
2016-08-03 15:09:20 +03:00
Alexey Tsvetkov
e0ebf2482b
Configure KotlinCompile.destinationDir before evaluation
...
Previously it was possible to refer to destinationDir
in gradle scripts (evaluation phase), so in order to
preserve compatibility destinationDir should be configured
before evaluation.
This does not affect android plugin because in this case kotlin
tasks were created after evaluation anyway, so it
was not possible to refer to destinationDir
during evaluation anyway.
2016-08-03 13:09:56 +03:00
Ilya Chernikov
1248230c69
Fix after review, add logging for scripting-specific behavior
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
fbc5d64aab
gradleScriptTemplateProvider: fix NPE
2016-08-03 09:51:40 +02:00
Ilya Chernikov
f73b8e80be
Fixes after review
2016-08-03 09:51:40 +02:00
Ilya Chernikov
df64736192
Refactor script dependnecies template and resolver interfaces:
...
- get rid of obsolete interfaces and annotations
- rename actual resolver interface to ScriptDependenciesResolver
- make ScriptDependenciesResolverEx interface compatible with the one from 1.1-M01 to be able to support both on the provider side
- add possibility to override file patter in the script template provider
- construct resolver lazily, if possible
2016-08-03 09:51:40 +02:00
Ilya Chernikov
8024367915
Move KotlinScriptDefinitionFromTemplate to separate file...
...
leaving only interfaces in the scriptTemplate.kt. It could now be extracted into the separate lib if necessary.
2016-08-03 09:51:40 +02:00
Ilya Chernikov
c73ab6c0a1
Fix pathlist comparison - fixes too frequent caches updates
2016-08-03 09:51:40 +02:00
Ilya Chernikov
31d9da3d4f
Update resolver interface - make it return Future and add message reporter function +
...
plus minor fixes
2016-08-03 09:51:40 +02:00
Ilya Chernikov
5117ecb817
Collect annotations lazily
2016-08-03 09:51:40 +02:00
Ilya Chernikov
80f7dda6c7
Update gradle script resolver environment:
...
- JVM options from IDEA config to connect/run daemon with appropriate options (need to be tested)
- A lexing function to allow gradle plugin to check whether dependency-defining part of the script is actually changed
2016-08-03 09:51:40 +02:00
Ilya Chernikov
3b1e7494b8
Change dependencies resolver API - it gets message reporter and returns Future now
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
464445c260
KotlinCacheServiceImpl: Add all sdks from project sdk table when building facadeForSdk
...
As of now facadeForSdk should contain all sdks that we can possibly reference while resolving including those that scripts depend on
More granular approach may be beneficial in the future
2016-08-03 09:51:40 +02:00
Ilya Chernikov
45ed340444
Add passing of allowKotlinPackage option from gradle plugin to compiler
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
bc0ccd4861
Refactor: move script module info related code to a separate file
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
a8416035b1
IDE Script support: use particular scripts dependencies when building analyzers
...
Use javaHome property to detect jdk to analyze script files against, use default jdk if it's null
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
350abbe8cd
KotlinScriptConfigurationManager, minor: Extract utility to get transform list of file to vfs roots
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
500554e58c
Clarify API so that it's possible to get single KotlinScriptExternalDependencies per script file
2016-08-03 09:51:40 +02:00
Ilya Chernikov
59712d4bf8
Implement updatable dependencies index with usage API in the environment for using in REPL
2016-08-03 09:51:40 +02:00
Ilya Chernikov
210a37e08c
Support for multiparam dependency annotations (with reservations)
...
Due to missing feature (#KT-13106) it works either with single argument
or with all named arguments.
2016-08-03 09:51:40 +02:00
Ilya Chernikov
5900cad8b3
Add possibility to pass script dependency resolver directly rather than via definition annotation
...
This may help to reduce dependencies in certain situations
2016-08-03 09:51:40 +02:00
shiraji
5fb79259f7
Intention / inspection for unnecessary lateinit #KT-13011 Fixed
...
(cherry picked from commit 45d82f1)
2016-08-03 09:31:03 +03:00
Mikhail Glukhikh
d868410093
Single-expression string template is inspection for strings and intention otherwise #KT-13113 Fixed
...
(cherry picked from commit 266f9d0)
2016-08-02 15:31:16 +03:00
shiraji
9b8c55d823
KT-13113: Add inspection to detect single-expression string template
...
(cherry picked from squashed commits 49a3ef3 and 4c7a42a)
2016-08-02 15:30:23 +03:00
Nikolay Krasko
a9ee10a8b7
Ignore intervals that has no mapping for origin line (KT-12896)
2016-08-02 01:05:08 +03:00
Nikolay Krasko
2dd7470cdc
Better search for inlined strings in strata: there might me several file mappings to the same file (KT-12896)
...
#KT-12896 In Progress
2016-08-02 01:05:05 +03:00
Nikolay Krasko
ace58e8aa2
Refactorings: functions moves
2016-08-02 01:02:07 +03:00
Nikolay Krasko
5df7358dab
Fix breakpoints in inline functions after dexing (KT-12896)
...
#KT-12896 In Progress
2016-08-02 01:02:07 +03:00
Nikolay Krasko
64979ae190
Allow to step into inline functions while debugging Android app (KT-12896)
...
#KT-12896 In Progress
2016-08-02 01:02:07 +03:00
Nikolay Krasko
2a2d7cd358
Emulate debugging after dexing for stepping tests with 'dex' prefix (KT-12896)
...
Remove SourceDebugExtension attribute from resulting class files
#KT-12896 In Progress
2016-08-02 01:02:07 +03:00
Nikolay Krasko
ad1907f48d
Refresh output dirs to make CompilerPaths.getModuleOutputDirectory() method work
2016-08-02 01:02:07 +03:00
Nikolay Krasko
64e034959f
Refactoring: introduce constants with strata names and reuse them in debugger
2016-08-02 01:02:07 +03:00
Nikolay Krasko
66bbcf470c
Refactoring: move smapUtil and DebuggerUtils to debugger package
2016-08-02 01:02:07 +03:00
Mikhail Glukhikh
39090113e9
KT-13262 related: surround with null check is applicable now also for qualified calls with argument type mismatch
...
(cherry picked from commit 8f13c84)
2016-08-01 12:24:49 +03:00
Mikhail Glukhikh
b7fd41844d
Wrap with safe let call handles qualified calls correctly #KT-13262 Fixed
...
(cherry picked from commit 7044348)
2016-08-01 12:24:38 +03:00
Mikhail Glukhikh
77b7648f10
Build fix: replace call with comparison inspection test
...
(cherry picked from commit 7f6be5b)
2016-08-01 12:24:27 +03:00
Mikhail Glukhikh
475dc6541b
Replace call with comparison inspection introduced #KT-11425 Fixed
...
(cherry picked from commit 042fc0d)
2016-08-01 12:24:14 +03:00
Mikhail Glukhikh
fc13b25ca4
KT-11425: convert a.compareTo(b) to binary comparison if possible
...
(cherry picked from commit 7219904)
2016-08-01 12:23:19 +03:00