Pavel V. Talanov
daef8a0eed
Light classes in IDE: Make light class delegate construction a two step process
...
Step 0: Light class object is created, no delegates are computed
Step 1: constructs dummy delegate which can not be relied upon to know signature of any member
It can be used to construct light field and light method objects
(which can correctly respond to some queries) before constructing real delegate
Step 2:
Construct real delegate if dummy delegate is not enough to respond to a query
This speeds up multiple scenarios where getMethods() and getFields() are called on numerous classes
Dummy delegate's faster consruction is achieved by using specially setup dumb analysis instead of ide analysis
Introduce LazyLightClassDataHolder: which manages creation of Step 1 and Step 2 delegates
Introduce MemberIndex: keeping track of member creation order, helps matching light class delegates created in different contexts
KtLightMethod and Field: make use of dummy delegate
KtLightMethod no longer extends LightMethod since it requires eager delegate construction
KtLightMethod now implements PsiAnnotationMethod for convenience (ClsMethodImpl implements PsiAnnotationMethod)
2017-03-15 20:54:55 +03:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Mikhail Glukhikh
d0cc1635db
Cleanup: apply "Use synthetic property access syntax"
2017-03-15 16:13:40 +03:00
Vyacheslav Gerasimov
b8563f7fcf
Fix KotlinUastTypesTest.testCycleInTypeParameters
2017-03-15 00:20:40 +03:00
Vyacheslav Gerasimov
830bf62d94
Fix SOE from UAST in containsLocalType
...
containsLocalType now properly handles start projections
#KT-16680 Fixed
2017-03-10 17:30:21 +03:00
Dmitry Jemerov
01a9d9a284
Support lazy conversion of parent chain; correctly check expected class
2017-03-09 17:07:43 +01:00
Dmitry Jemerov
8c3936a0ee
Update to UAST 0.12
2017-03-09 17:07:43 +01:00
Dmitry Jemerov
ea228a2fa8
Fix testdata for SimpleKotlinRenderLogTest
2017-02-16 11:43:16 +01:00
Dmitry Jemerov
41f7950ab8
UAST tests: don't null out the application if we have a valid one that we restored from a previous test
2017-02-15 18:21:37 +01:00
Dmitry Jemerov
95bfe8668d
UAST tests no longer leave a disposed application around
2017-02-15 12:56:21 +01:00
Vyacheslav Gerasimov
a2e429a912
Fixed exception in getUastLocation of class annotation argument
...
#KT-16326 Fixed
2017-02-14 15:56:37 +03:00
Dmitry Jemerov
87187437ab
Update UAST to version 1.0.11
2017-02-10 13:55:25 +01:00
Dmitry Jemerov
00003684e8
Add test for converting a string literal to UAST
2017-02-08 11:29:53 +01:00
Dmitry Jemerov
5dc178460e
Update UAST to 1.0.10; move uast-kotlin tests to Kotlin project
2017-02-08 11:29:53 +01:00
Dmitry Jemerov
0709561869
Add missing required type checks; correctly skip elements which have no UAST equivalents when converting an element together with parent; correctly convert string template entries (they aren't expressions)
2017-02-07 19:18:05 +01:00
Vyacheslav Gerasimov
1452129b60
Fixed InvalidMirrorException in uast while getting annotation argument location
2017-02-03 18:06:05 +03:00
Vyacheslav Gerasimov
10517c16ee
Uast 1.0.9
2017-02-03 18:06:04 +03:00
Vyacheslav Gerasimov
d0f1b81bfa
Fixed bugs in Kotlin Android Lint CleanupDetector
...
#KT-14780 Fixed
#KT-14677 Fixed
(cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
2017-01-25 10:50:35 +03:00
Mikhael Bogdanov
0a363fd1a5
Introduced test flag: JVM8_TARGET_WITH_DEFAULTS
2017-01-13 13:52:56 +01:00
Yan Zhulanow
f1b7d30363
Update uast-kotlin to Uast 1.0.8
2016-12-30 18:41:47 +03:00
Yan Zhulanow
7152c9c789
Use uast-common and uast-java as an external dependency
2016-12-30 18:41:45 +03:00
Yan Zhulanow
ff6ff108ad
Uast: Abort converting KotlinType to PsiType if it contains anonymous types (KT-15483)
2016-12-30 18:41:44 +03:00
Mikhael Bogdanov
0949f55921
Uast update due to new diagnostic for delegation by
2016-12-16 13:17:29 +01:00
Yan Zhulanow
d884830700
Allow to avoid declaration body resolution for function and property initializers if the return type is explicitly specified. This significantly reduces the analysis time in kapt3.
2016-12-05 19:57:43 +03:00
Vyacheslav Gerasimov
c6d668e243
Fixed "should not analyze element" problem with destructuring declarations in uast
2016-11-16 18:05:31 +03:00
Vyacheslav Gerasimov
55f14ba8c0
Fixed method parameter default value processing in uast
2016-11-16 18:05:22 +03:00
Vyacheslav Gerasimov
d90ec3e777
Fixed KotlinLintTestGenerated.testJavaPerformance + refactoring
...
Moved android lint tests from uast-kotlin to idea-android
2016-11-16 18:05:09 +03:00
Zalim Bashorov
1dedb38481
Regenerate tests
2016-11-09 21:41:12 +03:00
Vyacheslav Gerasimov
2a0557f742
Added missing KtLambdaArgument to UElement conversion in KotlinUastLanguagePlugin
...
#KT-14470 Fixed
2016-11-03 17:21:39 +03:00
Vyacheslav Gerasimov
29b9521596
Android lint check for api requirements for classes in catch clause (KT-13243)
...
Added test for #KT-14047, #KT-13243 Fixed, #KT-14047 Fixed
2016-11-03 17:21:17 +03:00
Yan Zhulanow
6ff29f473b
Uast: Migrate to UAnnotation
2016-11-01 19:36:32 +03:00
Yan Zhulanow
7404b91cb3
Lint: Fix diagnostic tests
2016-11-01 19:36:31 +03:00
Yan Zhulanow
4c4d6a4ad4
Temporary remove outdated Uast tests
2016-11-01 19:36:30 +03:00
Yan Zhulanow
d5d491e6b2
Lint: Update Uast implementation (the new version is without declaration level)
2016-11-01 19:36:30 +03:00
Alexander Udalov
53b584f48c
Simplify usages of IncrementalPackageFragment and related code
...
Since its scope is now empty, no descriptor now has a container that is an
instance of IncrementalPackageFragment -> a lot of code is not needed anymore
2016-10-05 11:24:30 +03:00
Michael Bogdanov
1eac6d47ed
GenerationState in TypeMapper replaced with boolean flag
2016-10-03 14:13:17 +03:00
Michael Bogdanov
0390cd6ee1
Added GenerationState to KotlinTypeMapper
2016-10-03 14:05:59 +03:00
Dmitry Petrov
796d11c860
ClassDescriptor is now a super-interface for ClassConstructorDescriptor and TypeAliasConstructorDescriptor.
2016-09-20 10:55:36 +03:00
Nikolay Krasko
67f353903e
Show lint diagnostics even if there're errors in the file (KT-12022)
...
It also affects working with KotlinChangeLocalityDetector. Right after error is fixed in local context file is still reported as having errors and diagnostics are not counted.
#KT-12022 Fixed
2016-09-02 13:41:24 +03:00
Michael Bogdanov
3b419e8ba3
Fix for KT-11964: No TABLESWITCH in when on enum bytecode if enum constant is imported
...
#KT-11964 Fixed
2016-06-29 09:32:45 +03:00
Yan Zhulanow
6e6c9682ec
Fix KT-12173 (Kotlin Lint False Positive for "Toast created but not shown" inside SAM adapter).
...
(cherry picked from commit 4940d3b)
2016-06-24 15:10:19 +03:00
Yan Zhulanow
8f75ababde
KT-12674 "Calling new methods on older versions" errors for inlined constants
...
Inlined constants from Java should not be detected.
(cherry picked from commit b34ee4e)
2016-06-24 15:10:19 +03:00
Yan Zhulanow
206e439595
KT-12023 Kotlin Lint: Cast doesn't trigger minSdk error
...
Check Kotlin as/is types.
(cherry picked from commit c0db8e0)
2016-06-24 15:10:19 +03:00
Yan Zhulanow
1de05b965e
KT-12015 (Kotlin Lint False Positive for Bundle.getInt())
...
Java approach is not sufficient here, in Kotlin receivers can be implicit.
Use Kotlin extension/dispatch receivers to figure out the receiver type for our method call.
(cherry picked from commit cdedf1d)
2016-06-24 15:10:19 +03:00
Yan Zhulanow
4ee19cce93
Fix #KT-12047 (Kotlin Lint: "Missing @JavascriptInterface on methods" does not report anything)
...
(cherry picked from commit 61e8e01)
(cherry picked from commit dbc54e2)
2016-06-24 15:10:19 +03:00
Yan Zhulanow
d1447faf2b
Fix #KT-12015 (Kotlin Lint False Positive for Bundle.getInt()).
...
Android firstly checks API version against the function call receiver type, so we should do the same to be consistent.
(cherry picked from commit c3d01ec)
(cherry picked from commit 5c78acc)
2016-06-24 15:10:19 +03:00
Nikolay Krasko
a6b16f6d00
Move uast dependency modules before idea module that now contains uast too.
2016-06-02 14:38:44 +03:00
Alexander Udalov
da42023dd9
Support new callable reference expressions in UAST
...
Manually mute the class literal test in apiCheck.kt; support for new class
literal expressions is postponed because it's not straightforward to combine
both unbound (Type::class) and bound (instance::class) class literals in one
UClassLiteralExpression: in Java they're two very different expressions
(Type.class and instance.getClass())
2016-05-26 22:22:41 +03:00
Valentin Kipyatkov
b551886889
Code cleanup: removed redundant semicolons
2016-04-29 11:26:25 +03:00
Mikhail Glukhikh
5c9d6fd460
UAST: unnecessary 'val' removed from constructor
2016-04-27 18:42:08 +03:00