Commit Graph

17898 Commits

Author SHA1 Message Date
Yan Zhulanow a4b3653e1c Debugger: Navigate to the right file in MPP projects (#KT-25152, #KT-25147) 2018-07-17 20:54:29 +03:00
Pavel V. Talanov 4c38899a2a Improve error message on failing to get javaResolutionFacade 2018-07-17 17:37:22 +02:00
Dmitry Savvinov db1fc7f358 Use 'stableName' instead of 'name' in tests on module name 2018-07-17 17:14:22 +03:00
Nikolay Krasko 2a6dfba8bc Check kotlinx.coroutines libraries used with Kotlin 1.3 in Gradle (KT-25251)
#KT-25251 In Progress
2018-07-17 02:46:34 +03:00
Nikolay Krasko f9de91016a Inspection for experimental coroutines imports migration (KT-25251)
#KT-25251 In Progress
2018-07-17 02:22:14 +03:00
Nikolay Krasko 5b34498162 Do not report code style warnings on overridden declarations (KT-25416)
#KT-25416 Fixed
2018-07-17 02:22:14 +03:00
Pavel V. Talanov 48a38f1820 Do not try inexact resolve on scripts
Script light psi depends on script definition
    which is costly to compute correctly

 #KT-25395 Fixed
2018-07-16 16:25:18 +02:00
Alexey Sedunov 65e763d562 Misc: Fix flaky test failing due to unstable ordering of libraries 2018-07-16 16:12:23 +03:00
Alexander Udalov f766b2c473 Improve "optimize imports" behavior on default imports
Optimize imports to classes when there's an import of a type alias to
that class with the same name. This results in "java.lang.*" imports
being optimized in favor of the corresponding type aliases in "kotlin.*"
which are imported by default
2018-07-16 13:45:11 +02:00
Alexander Udalov ce34deb9af Delete DefaultImportProvider, refactor TargetPlatform.defaultImports 2018-07-16 13:45:11 +02:00
Alexander Udalov 1f0fb4823f Simplify DefaultImportProvider, introduce "low priority imports"
Previously, packages `java.lang` and `kotlin.jvm` were imported on JVM
by default on the same rights, causing problems when the same classifier
existed both in `java.lang` and `kotlin.jvm`. Since the only known case
of such conflict were type aliases to JVM classes, the corresponding
classes (expansions of those type aliases) were manually excluded from
default imports. This made the code in DefaultImportProvider complicated
and resulted in multiple problems, regarding both correctness and
performance (see 82364ad3e5, a9f2f5c7d0, dd3dbda719).

This change adds a new concept, a "low priority import", and treats
`java.lang` as such. Since these imports are now separated from the rest
of default imports in LazyImportScope via secondaryClassImportResolver,
conflicts between classifiers are handled naturally: the one from
`kotlin.jvm` always wins (unless the one from `java.lang` is imported
explicitly, of course). This approach is simpler, safer and does not
require any memory to cache anything.

Skip ResolveToJava.kt test for javac-based resolve; it now fails because
of a weird issue which I didn't have time to investigate (this is OK
because it's a corner case of an experimental functionality)
2018-07-16 13:45:11 +02:00
Max Medvedev 5c8afea68e Completion fallback to DescriptorToSourceUtilsIde.getAnyDeclaration
That's in case if DescriptorToSourceUtils.getSourceFromDescriptor fails

#KT-22373 Fixed
2018-07-14 15:17:03 +03:00
Nikolay Krasko dfcc41ebb0 Fix source position NPE (EA-118863) 2018-07-13 20:00:05 +03:00
Nikolay Krasko f1c87376b9 Another NPE in PlainTextPasteImportResolver.kt (EA-91517) 2018-07-13 20:00:05 +03:00
Nikolay Krasko ee5d357336 Guard PatternConfigurationProducer usages with JUnit presence check (EA-122472) 2018-07-13 20:00:04 +03:00
Nikolay Krasko 752cdedfe2 Stop reporting "using default platform" messages to log (KT-15300)
#KT-15300 Fixed
2018-07-13 20:00:04 +03:00
Denis Zharkov 89d99e3989 Refine diagnostics for nullability migration warnings
#KT-24911 Fixed
2018-07-13 17:51:21 +03:00
Nicolay Mitropolsky cedc6821c3 lightAnnotations: proper parents for KtLightAnnotationsValues 2018-07-13 15:45:30 +03:00
Georgy Bronnikov 8478c73434 Make @JvmStatic work on JVM_IR 2018-07-13 13:43:02 +03:00
Toshiaki Kameyama 2547612d54 Implement Smart Enter handler for value argument list (KT-18807)
#KT-18807 Fixed
2018-07-13 13:04:19 +03:00
Natalia Selezneva 25cc85241f 172: Fix absent method in 172 branch 2018-07-13 12:02:08 +03:00
Natalia Selezneva 68ffcdc653 182: Fix imports in 182 branch 2018-07-13 11:33:10 +03:00
Natalia Selezneva 6835e5dd6f Wraps syncPublisher() call in KotlinCompilerSettings in a dispose check
Fix ConfigureKotlinTest
2018-07-13 09:50:42 +03:00
Yan Zhulanow a464cc7f28 Minor: Do not report stack traces about PCE to the debug log 2018-07-12 20:36:42 +03:00
Yan Zhulanow 2070d40963 Minor: Move safeSourceName to utils, make it a function 2018-07-12 20:36:41 +03:00
Yan Zhulanow 22cfde3d43 Debugger: Check if the class instance is not yet collected before usage (EA-118758) 2018-07-12 20:36:41 +03:00
Yan Zhulanow a2fdf7d47d Evaluator: Support when expressions (EA-119639) 2018-07-12 20:36:41 +03:00
Yan Zhulanow c749a222eb Debugger: Add a missing read action (EA-119592) 2018-07-12 20:36:41 +03:00
Yan Zhulanow 2203615085 Check if the stackFrame we use is valid (EA-120312)
Unfortunately, the 'isValid' is a private field in StackFrameImpl so we have to catch an exception with an empty catch block.
2018-07-12 20:36:41 +03:00
Yan Zhulanow cf3550b139 Add a number of runReadAction() in debugger (EA-120985) 2018-07-12 20:36:40 +03:00
Yan Zhulanow 115356b990 Eval4J: Do not report certain kinds of exceptions to EA 2018-07-12 20:36:40 +03:00
Yan Zhulanow d6db9e8f6f Evaluator: Do not report division by zero (EA-122365) 2018-07-12 20:36:40 +03:00
Yan Zhulanow f16da8c566 Debugger: Add a missing read action (EA-123238) 2018-07-12 20:36:40 +03:00
Yan Zhulanow 778df36dfa Debugger: Exclude inline callable usages inside itself (EA-117459) 2018-07-12 20:36:39 +03:00
Yan Zhulanow b2938ceacf Remove Gradle(Java) Kotlin configurator in Android modules (#KT-17946) 2018-07-12 20:36:39 +03:00
Yan Zhulanow 06af2a88f0 Uast: Move all IDE-related code to uast-idea, get rid of the 'idea' dependency
Uast is used in the CLI version of Android Lint so 'uast-kotlin' should run correctly even without IDE.
2018-07-12 20:36:39 +03:00
Yan Zhulanow e958a9771f Extract refactoring: Make an extracted function 'inline' if any of its type parameters are reified (#KT-23983) 2018-07-12 20:36:38 +03:00
Ilya Gorbunov ed7f7ba737 Assigning single value to varargs is prohibited, use arrayOf 2018-07-12 14:33:15 +03:00
Nikolay Krasko 5bfb35c8aa Revert "Add knowledge about eap-1.3 channel to plugin (KT-25414)"
It's decided to migrate to scheme with two predefined channels:
`eap` and `eap-next`.

This reverts commit 4f1f1e6
2018-07-12 13:32:19 +03:00
Sergey Rostov c8d85150de ReplOutputHandler: log xml parsing exception cause (EA-103447) 2018-07-12 10:26:37 +03:00
Natalia Selezneva 79a80ce8de Use new syntax for '.gradle.kts' files in AddKotlinLibQuickFix
^KT-25403 Fixed
2018-07-12 10:03:40 +03:00
Natalia Selezneva e395a32734 Add quickfix to adding kotlin-script-runtime.jar to classpath
^KT-25402 Fixed
2018-07-12 10:03:35 +03:00
Simon Ogorodnik 75fa02646b EA-109046: Add diagnostic to catch NPE 2018-07-11 20:50:02 +03:00
Nikolay Krasko 4f1f1e66eb Add knowledge about eap-1.3 channel to plugin (KT-25414)
#KT-25414 Fixed
2018-07-11 17:25:30 +03:00
Natalia Selezneva d241c092e2 Fix deadlock in ScriptTemplatesFromCompilerSettingsProvider
^KT-25373 Fixed
2018-07-11 16:23:58 +03:00
Nikolay Krasko d709b03160 Load/Save for old Intellij formatting settings (KT-22252)
#KT-22252 In Progress
2018-07-11 14:25:24 +03:00
Nikolay Krasko 6a4d2c1fdb Predefined obsolete code style (KT-22252)
#KT-22252 In Progress
2018-07-11 14:25:24 +03:00
Nikolay Krasko b51880332e Migration inspection for fromClosedRange() call (KT-17176)
#KT-17176 Open
2018-07-11 14:25:24 +03:00
Nikolay Krasko a58acdd537 Fix suspend inlay tests after adding yield() from stdlib to ignore 2018-07-10 19:24:23 +03:00
Alexander Udalov e937fe8258 Move PackagePartProvider to module descriptors.jvm 2018-07-10 15:16:49 +02:00