Nicolay Mitropolsky
b4db744a9b
Uast: KotlinStringULiteralExpression.getExpressionType() made always return String
2018-01-16 20:38:00 +03:00
Yan Zhulanow
2ee23ddd02
EA-101715: Handle also case with IntegerValueTypeConstructor
2018-01-15 12:39:35 +09:00
Nicolay Mitropolsky
f8601479de
Uast: handling @receiver annotations
2018-01-12 13:54:38 +03:00
Nicolay Mitropolsky
e7200d16c3
Uast: no more need to exclude UIdentifier from JvmDeclarationUElement check
2018-01-12 13:54:33 +03:00
Nicolay Mitropolsky
e22e466485
Uast: making AbstractKotlinUClass not inherit from AbstractJavaUClass
2018-01-12 13:54:32 +03:00
Nicolay Mitropolsky
260c549cd7
Uast: AbstractKotlinUVariable annotations now are retrieved from Kotlin Psi, not from compiled (KT-21025)
...
and `KotlinNullabilityUAnnotation` now is created for every `AbstractKotlinUVariable`
2018-01-12 13:54:29 +03:00
Nicolay Mitropolsky
f0723a5c07
Uast: WrappedUAnnotation as replacement for usage of JavaUAnnotation (KT-21025)
2018-01-12 13:54:28 +03:00
Nicolay Mitropolsky
208a986eab
UAST: support for JvmDeclarationUElement
2018-01-12 13:53:25 +03:00
Vyacheslav Gerasimov
e6efaaf752
UAST: Add testConvertTypeInAnnotation
2018-01-12 13:52:56 +03:00
Vyacheslav Gerasimov
92c23aa0ed
UAST: override getFunctionalInterfaceType + test
2018-01-12 13:52:55 +03:00
Vyacheslav Gerasimov
8eddb10870
UAST: Properly handle annotations on local variables
2018-01-12 13:52:54 +03:00
Nicolay Mitropolsky
4a4bf5635d
Uast: KtLightAnnotation converting support (KT-21702)
2018-01-10 15:12:12 +03:00
Nicolay Mitropolsky
da98b7e07b
Uast: type-mapper checks deeper for local classes (KT-21546, EA-100195)
2017-12-15 09:16:46 +03:00
Nicolay Mitropolsky
b8069b48c5
Uast: returning back secondary constructors bodies (KT-21575)
...
but secondary constructors without primary constructor will not contain initializers, it is still an issue
2017-12-06 22:19:57 +03:00
Nicolay Mitropolsky
1dbce18afc
Uast: constructors calls consistency except anonymous object literals (KT-21409)
2017-11-30 20:08:16 +03:00
Nicolay Mitropolsky
3bfa5c4706
Uast: parsing primary constructors superCalls (KT-21409)
2017-11-30 20:08:16 +03:00
Pavel V. Talanov
cdfdc1d19b
Refactor script definitions loading
...
Make ScriptDefinitionProvider an interface
and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Nicolay Mitropolsky
fab8187574
UAST: Complex test data moved to separate file (KT-20990)
2017-11-06 19:59:50 +03:00
Nicolay Mitropolsky
1fa5152cb7
UAST: Fix for unsafe cast for class initializer (EA-109918)
2017-10-24 19:39:38 +03:00
Nicolay Mitropolsky
8a34c48d56
AbstractUastTest: findUElementByTextFromPsi refactored for readability
2017-10-23 16:44:43 +03:00
Nicolay Mitropolsky
299a4b7f69
UAST: Fix for unsafe cast for annotation (EA-109738)
2017-10-23 10:57:00 +03:00
Nicolay Mitropolsky
c5fa7fb217
UAST: tests utils for bottom-top finding UElements moved to AbstractUastTest.kt
2017-10-23 10:57:00 +03:00
nickl
6a659f33b5
UastKotlinPsiVariable psiParent made lazy to eliminate recursion when building UAST parents
2017-10-20 19:46:49 +03:00
xiexed
5c2962e195
UAST properly handles string "when conditions" in lazy parent (KT-20709) ( #1338 )
2017-10-11 15:16:15 +02:00
Nicolay Mitropolsky
d609579e55
FakeFileForLightClass tries to use ktFile.originalFile.virtualFile
2017-10-06 23:53:33 +03:00
Dmitry Jemerov
703d053157
Additional fixes for consistent parent conversion
2017-10-06 20:51:04 +02:00
Vyacheslav Gerasimov
b12f24b41c
Fix KtLightClass conversion and testParameterPropertyWithAnnotation
2017-10-06 20:51:03 +02:00
Dmitry Jemerov
bab2641bed
Don't test parent structure consistency in irrelevant cases
2017-10-06 20:51:03 +02:00
Dmitry Jemerov
a4f5a1335a
Fix convering parents of annotations on primary constructor parameters
2017-10-06 20:51:02 +02:00
Dmitry Jemerov
e63838703a
Consistently convert local functions to UAST
2017-10-06 20:51:01 +02:00
Dmitry Jemerov
c98c3a7033
Work in progress on consistent UAST structure
2017-10-06 20:51:00 +02:00
Dmitry Jemerov
b638febc41
Fix conversion of destructuring declarations
2017-10-06 20:51:00 +02:00
Dmitry Jemerov
40daeb13d1
Evaluate parents of UAST elements lazily
...
Also add tests for UAST consistency in various cases
2017-10-06 20:51:00 +02:00
Dmitry Jemerov
85254838f6
Allow building UAST for in-memory virtual files
2017-10-06 14:43:22 +02:00
Vyacheslav Gerasimov
bba2d27e82
UAST: Fix getType and getText for UastKotlinPsiVariable
2017-09-16 13:21:44 +03:00
Vyacheslav Gerasimov
14742a6048
UAST: Fix getContainingFile, should return KtFile instead of FakeFileForLightClass
...
#KT-20170 Fixed
2017-09-16 13:02:08 +03:00
Vyacheslav Gerasimov
b6c32edc43
Implement Kotlin Script support in UAST
...
#KT-18353 Fixed
2017-09-12 13:10:38 +03:00
Nikolay Krasko
c479e585ca
Clean project in uast tests
2017-09-08 12:56:28 +03:00
Nikolay Krasko
fcab80db96
Add uast-tests files to our project
...
Copy files from obsolete project https://github.com/JetBrains/uast
2017-09-08 12:56:28 +03:00
Vyacheslav Gerasimov
f4da6c2cc6
UAST: findAttributeValue returns default value when no declared value found
2017-09-01 13:32:00 +03:00
Vyacheslav Gerasimov
2e1edaf3d4
Uast: Fix getExpressionType for elvis expression
...
#KT-18997 Fixed Target Versions 1.1.5
2017-08-23 13:18:49 +03:00
Vyacheslav Gerasimov
c549c63100
Light Classes: Correctly handle annotations for property parameters
...
When getting annotations for KtLightParameter which is property parameter we should return annotations for parameter instead of property
#KT-19671 Fixed
2017-08-21 15:01:51 +03:00
xiexed
6a4ea8b669
toUElement() made work with KtAnnotationEntry (#1240 )
...
* `KotlinUastLanguagePlugin#convertElement` made work with `KtAnnotationEntry`
* `KotlinUastLanguagePlugin#convertElementWithParent` searches for parent `KotlinUNamedExpression`
2017-08-16 13:01:37 +03:00
Vyacheslav Gerasimov
915f47133b
UAST: Fix KotlinUMethod annotation handling, properly handle use site targets
...
#KT-16834 Fixed
#KT-18893 Fixed
2017-08-09 15:34:34 +03:00
Alexander Udalov
999e4cda1d
Compute module mappings eagerly in JvmPackagePartProvider, refactor
...
Previously we traversed all notLoadedRoots on each request for package
parts with the given package FQ name. Since notLoadedRoots might contain
a lot of roots (which never transition into "loadedModules" because e.g.
they are not Kotlin libraries, but just Java libraries or SDK roots with
the META-INF directory), this was potentially hurting performance. It
seems it's more optimal to compute everything eagerly once
JvmPackagePartProvider is constructed.
Another problem with the previous version of JvmPackagePartProvider was
that it did not support "updateable classpath" which is used by REPL and
kapt2, it only used the initial roots provided in the
CompilerConfiguration. In REPL specifically, we would thus fail to
resolve top-level callables from libraries which were dynamically added
to the execution classpath (via some kind of a @DependsOn annotation).
In the new code, JvmPackagePartProvider no longer depends on
CompilerConfiguration to avoid this sort of confusion, but rather relies
on the object that constructed it (KotlinCoreEnvironment in this case)
to provide the correct roots. This is also beneficial because the
computation of actual VirtualFile-based roots from the ones in the
CompilerConfiguration might get trickier with modular Java 9 roots
2017-06-26 16:22:05 +03:00
Vyacheslav Gerasimov
643e3587cc
Kotlin UAST should visit property delegate expression
...
#KT-15164 Fixed
2017-06-06 20:47:01 +03:00
Pavel V. Talanov
f3f2379e5a
KtLightMemberModifierList:hasExplicitModifier("default") returns false
...
#KT-18070 Fixed
2017-06-06 17:11:17 +03:00
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
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
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