Natalia Selezneva
c1dd86d323
Use module name from userData to get module info for scratch file
2018-04-10 14:06:09 +03:00
Pavel V. Talanov
de71598794
Fix line markers for actual enum entries
...
#KT-22632 Fixed
2018-04-04 17:56:35 +02:00
Pavel V. Talanov
36d23e4501
Refactor: merge synonymous utils
2018-04-04 17:56:33 +02:00
Pavel V. Talanov
784936eb00
Show 'actual/expect' icons for declarations in addition to visibility
2018-04-04 17:56:33 +02:00
Pavel V. Talanov
c86a6cf21d
Minor: rename expect/actual icon constants
...
Reflect icons' content
2018-04-04 17:56:32 +02:00
Pavel V. Talanov
9c9cdee7f0
Refactor: move utils related to expect/actual declarations and MPPs
...
Move them to 'idea-analysis' module
2018-04-04 17:56:32 +02:00
Ilya Chernikov
da56f54982
Use script compiler options on script dependencies in the IDE as well
...
further fixes #KT-19120
2018-04-04 16:58:14 +02:00
Natalia Selezneva
3d73786e98
Highlight scripts according to ScriptLocation annotation in ScriptDefinition
2018-03-30 14:43:17 +03:00
Dmitry Jemerov
9516c638ea
Use more efficient file type check (avoid identifying file type by file)
2018-03-29 13:11:37 +02:00
Dmitry Jemerov
85ebe97597
Avoid unnecessary collection copy (KT-23384)
2018-03-29 13:11:36 +02:00
Mikhail Zarechenskiy
81ac3a4f2f
Add ability to enable new inference in the platform
2018-03-28 18:32:28 +03:00
Mikhail Glukhikh
9170aa0674
Distinguish PARTIAL_WITH_CFA resolve mode from just PARTIAL
...
So #KT-23182 Fixed
2018-03-28 12:04:33 +02:00
Mikhail Glukhikh
5d57341ee4
Make cheaper analysis in KtReference.resolveToPsiElements
...
Related to KT-23182
2018-03-28 12:04:13 +02:00
Alexander Udalov
7f1a468b2e
Read virtual files safely in KotlinMetadataStubBuilder
...
Do not fail on an invalid file, or on a file pointing to a non-existent
.jar entry, exactly as this is done in KotlinMetadataDecompiler
2018-03-26 15:54:28 +02:00
Nikolay Krasko
982b768c69
Refactoring: collect callbacks for collecting module info in one place
2018-03-23 18:04:08 +03:00
Nikolay Krasko
525d90540a
Refactoring: enumerate used components in PerFileAnalysisCache.kt
2018-03-23 18:04:03 +03:00
Nikolay Krasko
586860e03a
Refactoring: store correspondent module info in module content
2018-03-23 18:04:01 +03:00
Nikolay Krasko
3e313509e1
Refactoring: restrict callback in ResolverForProjectImpl
2018-03-23 18:03:59 +03:00
Nikolay Krasko
666d31bdc4
Refactoring: visibility restrictions
2018-03-23 18:03:57 +03:00
Nikolay Krasko
38a79086d3
Rename: ResolutionFacadeImpl -> ModuleResolutionFacadeImpl
2018-03-23 18:03:54 +03:00
Nikolay Krasko
dced45d1bf
Refactoring: rename AnalyzerFacade -> ResolverForModuleFactory
2018-03-23 18:03:52 +03:00
Nikolay Krasko
059013a8d3
Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in ResolutionFacade
2018-03-23 17:58:11 +03:00
Nikolay Krasko
f2b478f304
Rename: analyzeFullyAndGetResult -> analyzeWithAllCompilerChecks in resolutionApi.kt
2018-03-23 17:58:10 +03:00
Denis Zharkov
e162749366
Add a cache for PsiBasedClassResolver instances
...
The PsiBasedClassResolver constructor isn't very cheap to call
because it runs computation of conflicting names each time
Again, this is helpful for Spring-interop because PsiBasedClassResolver
is used very frequently there
#KT-23380 Fixed
2018-03-23 12:36:15 +03:00
Denis Zharkov
673d1aa91d
Fix a memory leak of old resolve session from light classes
...
The problem is that diagnostics might indirectly retain a reference to an
obsolete ResolverForProject (it becomes outdated after out of block
modification).
At the same time light class instances may survive afer OOM when they
are leaked somewhere (e.g. to Java resolve)
The idea is to store the Diagnostics instance inside a
ResolverForProject component which will be collected once
ResolverForProject is collected itself.
#KT-23380 In Progress
2018-03-23 12:36:15 +03:00
Nikolay Krasko
117890dba8
Fix generating cls stubs when is metadata using type tables (KT-23345)
...
Affected cases:
- return type for suspend lambda
- aliased type in type alias declaration
- using type alias instead of aliased type in declarations
#KT-23345 Fixed
2018-03-22 11:54:03 +03:00
Denis Zharkov
d8538db719
Avoid retaining whole KotlinClassHeader in IDEKotlinBinaryClassCache
...
Before this change there was a retention chain
VirtualFile -> KotlinBinaryData -> KotlinBinaryHeaderData -> KotlinClassHeader
The latter one contains all binary metadata (a lot of String[])
while only a small part of it is used.
The used parts are moved straight to KotlinBinaryClassHeaderData
in this change.
#KT-19484 Fixed
2018-03-20 10:46:13 +03:00
Ilya Chernikov
d6792f5f52
Implement support for additional compiler arguments for scripts in IDE
...
fixes #KT-19120
2018-03-19 11:45:10 +01:00
Natalia Selezneva
f957b3072b
Add FATAL severity to ScriptExternalHighlightingPass
2018-03-17 00:28:34 +03:00
Natalia Selezneva
4b4acfee2c
Scripts: display errors from external resolver in panel if text range is empty
2018-03-17 00:21:10 +03:00
Natalia Selezneva
9f02664351
Minor: reformat
2018-03-17 00:20:55 +03:00
Nikolay Krasko
14a0434737
Remove reference to binding context from LazyLightClassDataHolder cache
...
The ultimate goal is to remove references to binding context and resolve
result from light classes. There still can be references from `diagnostics`
field, but `bindingContext` is unneeded and can be removed.
Relates to snapshots from IDEA-187395.
2018-03-16 16:40:37 +03:00
Simon Ogorodnik
c0b0f6d1ca
Extract PSI to separate module
2018-03-16 13:32:14 +03:00
Nikolay Krasko
bc7ccbc39b
Fix stub mismatch for top level declaration with JvmPackageName (KT-21831)
...
ClassId stores jvm name and it differs from kotlin name in that case.
#KT-21831 Fixed
2018-03-14 21:16:58 +03:00
Alexander Udalov
3f3e05a9d2
Move essential metadata-related classes to 'metadata' and 'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov
88dea9aa70
Move NameResolver to module 'metadata' and J2K
...
Also move NameResolverImpl to 'metadata' and JvmNameResolver to
'metadata.jvm'
2018-03-14 12:25:16 +01:00
Alexander Udalov
0ba42850f9
Drop ClassData and PackageData, rename ClassDataWithSource -> ClassData
...
Use pairs in JvmProtoBufUtil for simplicity
2018-03-14 12:25:15 +01:00
Alexander Udalov
b07c6086cd
Remove dependency of NameResolverImpl on FqName
...
Remove AbstractJsProtoComparisonTest.getProtoData in favor of
(apparently copy-pasted) IncrementalJsCache.getProtoData
2018-03-14 12:25:12 +01:00
Alexander Udalov
4f81e572c7
Make NameResolver.getName extension instead of member
...
To get rid of dependency of NameResolver on Name
2018-03-14 12:25:11 +01:00
Alexander Udalov
e31f286444
Make NameResolver.getClassId extension instead of member
...
To get rid of dependency of NameResolver on ClassId
2018-03-14 12:25:11 +01:00
Alexander Udalov
27ad4f7d5d
Move ProtoBuf classes to package org.jetbrains.kotlin.metadata
2018-03-14 12:25:10 +01:00
Pavel V. Talanov
32516a3f33
Refactor: split *LightClassGenerationSupport into separate files
...
Move cli binding trace implementation to top level
2018-03-12 12:05:05 +01:00
Pavel V. Talanov
f421181e16
Split LightClassGenerationSupport into separate entities
...
LightClassGenerationSupport:
Includes utilities related to generating light classes
Primary client of this service are KtLight* implementation classes
KotlinAsJavaSupport:
Provides APIs to transform kotlin code into Psi* entities
Primary client of this service is JavaElementFinder
2018-03-12 12:04:59 +01:00
Alexey Sedunov
d9aa1796cd
MPP: Support multiple 'expectedBy' dependencies for single module
...
#KT-22865 Fixed
2018-03-07 18:34:03 +03:00
Dmitry Jemerov
81adbcb7e6
Support for implicit package prefixes
...
Now, if all Kotlin files directly under a source root have the same
package statement, it's used as an implicit package prefix for that
source root. It's honored by the package name/directory name mismatch
inspection and by new file creation actions;
support in refactorings is TODO.
#KT-17306 Fixed
2018-03-07 10:31:57 +01:00
Alexey Sedunov
5bff4b9f39
Rename: Allow deleting name of companion object
...
#KT-20178 Fixed
2018-03-06 15:15:42 +03:00
Alexey Sedunov
d690aedb89
References: Fix resolution of delegate reference for local variables
...
#KT-22229 Fixed
2018-03-06 15:15:40 +03:00
Pavel V. Talanov
d2b90b84f8
KotlinFileStubForIde: save full facadeFqName
...
Prefix is not necessarily same as packageFqName since JvmPackageName was introduced
2018-03-06 12:05:53 +01:00
Nikolay Krasko
9e061555af
Use anchor for element to avoid working with invalid element (KT-22631)
...
Element in constructor can be invalidated when dumb mode begins/ends.
Working with invalid elements can produce nodes without icons and bad
presentation.
#KT-22631 Fixed
2018-03-06 13:04:26 +03:00
Nikolay Krasko
bb9933a8f9
Reformat: structureView package
2018-03-06 13:04:25 +03:00