Alexander Udalov
1df13e0bc9
Move TopDownAnalyzerFacadeForJVM to module 'cli'
...
It's only used in the command line compiler and in tests
2017-06-06 14:29:23 +03:00
Mikhail Glukhikh
d185adfedd
Fix UAST test
2017-05-16 16:43:29 +03:00
Mikhail Glukhikh
768e0fa738
Add forgotten KotlinAbstractUElement.hashCode()
2017-05-12 22:27:58 +03:00
Dmitry Jemerov
8337cd455f
Fix reporting exception problems on Kotlin UAST fields (KT-17714)
2017-05-06 08:18:08 +02:00
Pavel V. Talanov
55a0e138fc
Refactor: extract AnnotationDescriptor.annotationClass utility
2017-05-02 15:40:20 +03:00
Pavel V. Talanov
0571c62943
KtLightElements: make light annotations lazier
...
Allow to get annotation list and to invoke `findAnnotation` without building delegate
Introduce KtLightNullabilityAnnotation which holds nullability information and is built
before delegate is built
2017-05-02 15:40:17 +03:00
Alexander Udalov
7f5d87ea17
Rename PathUtil.getJdkClassesRoots to avoid confusion
...
Two of these methods return roots given a path to the JRE, and the third
one returns roots given a path to the _JDK_.
2017-04-27 20:35:14 +03:00
Alexander Udalov
38ea9986ab
Make KotlinType.isError extension instead of member
2017-04-26 18:10:49 +03:00
Dmitry Jemerov
49a211b3cd
Ensure that UElement.nameIdentifier.containingFile is a real file
...
This is needed to report inspection problems on UAST elements.
2017-04-20 11:02:56 +02:00
Dmitry Jemerov
03cef30717
Correctly honor expected type when converting string templates to UAST
...
#KT-17315 Fixed
#KT-17316 Fixed
2017-04-19 11:46:13 +02:00
Dmitry Jemerov
dd4a5944f1
Delegate getContaingFile() for UAST declarations to Kotlin origin
...
This is required to be able to report inspection problems on such
elements.
2017-04-18 15:13:34 +02:00
Vyacheslav Gerasimov
107879a78a
Implement getTypeElement for UastKotlinPsiVariable
...
#KT-16849 Fixed
2017-04-10 12:40:33 +03:00
Pavel V. Talanov
4f701285b1
Light class builder: do not generate methods delegating to DefaultImpls in kotlin classes
...
Class APIs from java point of view stays the same so we can avoid generating those methods
Otherwise we have to calculate all supertypes when getMethods() is called,
which imposes severe performance penalties
We have to pretend these methods are not 'abstract' (also we consider them 'default' for safety)
so java highlighting does not report "class should be abstract" for all inheritors
We have to manually report "class should be abstract" on some of the java inheritors,
specifically those that are implementing interfaces directly
as opposed to extending kotlin classes implementing those interfaces
2017-04-09 15:09:01 +03:00
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