Commit Graph

2454 Commits

Author SHA1 Message Date
Mikhail Glukhikh ef3ba5f0b1 Test local inspections on the fly via highlighting
Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
2018-04-18 16:14:43 +03:00
Pavel V. Talanov 33a312c26d Do not throw when trying to resolve java outside project model
#KT-23444 Fixed
 #KT-22825 Fixed
2018-04-17 16:19:49 +02:00
Nikolay Krasko ecd2db3b48 Remove bunch files that are equal to base files 2018-04-16 15:55:53 +03:00
Nikolay Krasko 1fb2b40684 Fix 182 branch after QueryExecutor and subclasses update
Parameter taking Processor<T> were replaced with Processor<? super T>.
https://github.com/JetBrains/intellij-community/commit/aaed1ccb910f6f4a9ea2f96894d99b6e35a59ef9
https://github.com/JetBrains/intellij-community/commit/c6b40a53ee5b2a0807c55adafb59edb453090915

Instead of updating all usages, use ExecutorProcessor to avoid
different source code for different IDEAs.
2018-04-14 15:29:38 +03:00
Nikolay Krasko 2260f66e02 Unify usage of ProgressManager.progressIndicator 2018-04-12 19:29:01 +03:00
Alexey Tsvetkov 2f4dcd609c 182: Remove deprecated StoragePathMacros usages
Deprecated `StoragePathMacros.PROJECT_CONFIG_DIR` and
`StoragePathMacros.PROJECT_FILE` were removed in Intellij.
2018-04-11 16:28:41 +03:00
Alexander Podkhalyuzin f5e0dfaf8c 181: Parameter state in PersistenceStateComponent is not null now in platform 2018-04-11 16:28:26 +03:00
Nikolay Krasko 577e6e5206 172: Try to remove unneeded commits in 172 branch
Revert "[Unneeded?] Revert "ExpressionOfTypeProcessor: get member name in read action""
This reverts commit 7ec59fc

Revert "[Unneeded] Revert "AbstractNavigateToLibraryTest: fix for invalid files""
This reverts commit 9e80c60

Revert "[Unneeded?] Revert "AbstractExtractionTest: fix for invalid files""
This reverts commit 0b2113b

Revert "[Unneeded] Revert "AbstractIntentionTest: `isApplicableOnPooled` made run under ProgressIndicator""
This reverts commit a41c247
2018-04-11 16:28:09 +03:00
Nikolay Krasko 9c38454c2e 172: [Unneeded?] Revert "ExpressionOfTypeProcessor: get member name in read action"
This reverts commit 32d8e0c72b877f0c0123bb56e0d92beaab410daa.
2018-04-11 16:28:09 +03:00
Nikolay Krasko 368dd193ac 172: Revert "Fix compilation after moving to idea 173"
This reverts commit fe121cc6aeadf63ca2c2819c9c7df59cc81caf5d.
2018-04-11 16:28:02 +03:00
Ilmir Usmanov 2cfe387bab Move coroutines to kotlin.coroutines package: compiler
Generate continuation type as kotlin.coroutines.Continuaion. This code will
fail at runtime since there is no stdlib backing this change yet.
However, in order to generate compatible stdlib we need a compiler, which
generates continuation type as kotlin.coroutines.Continuation.
Thus, firstly we support the change in the compiler, make it bootstrap
compiler and only then change stdlib and tests accordingly.
 #KT-23362
2018-04-10 22:51:46 +03:00
Natalia Selezneva a58bc7f301 Fix transitive module dependencies for scripts 2018-04-10 14:07:04 +03:00
Natalia Selezneva 429e0afe2a Fix the way how script SDK is found in IDE 2018-04-10 14:06:45 +03:00
Natalia Selezneva 8d9f539c79 Return correct ProjectFacade for script and its dependencies
^KT-22588 Fixed
2018-04-10 14:06:34 +03:00
Natalia Selezneva d75d0d8711 Refactor ScriptDependenciesModuleInfo
Do not mix ScriptDependenciesInfo for all project and for concrete script.
Rename ScriptDependenciesModuleInfo to ScriptDependenciesInfo
Rename ScriptDependenciesModuleSourceInfo to ScriptDependenciesSourceInfo
2018-04-10 14:06:29 +03:00
Natalia Selezneva 37a95765cb Add scriptDependencies moduleInfo for scripts located in module source 2018-04-10 14:06:16 +03:00
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