Commit Graph

129 Commits

Author SHA1 Message Date
Nikolay Krasko ecd2db3b48 Remove bunch files that are equal to base files 2018-04-16 15:55:53 +03:00
Vyacheslav Gerasimov 4299455dc1 as32: Update to AS 3.2 C10 2018-04-13 21:33:03 +03:00
Alexey Sedunov e51b6927b6 Refactor: Introduce JTextComponent.onTextChange() function 2018-04-13 20:23:07 +03:00
Nikolay Krasko 672169f3be Forgotten bunch file commit reminder 2018-04-11 16:28:45 +03:00
Nicolay Mitropolsky 22186c05b4 182: KotlinDecompilerServiceImpl and KtParsingTestCase compilation fixes 2018-04-11 16:28:40 +03:00
Nikolay Krasko d32c9ada59 181: Remove deprecated API from language injection in 181 2018-04-11 16:28:28 +03:00
Vyacheslav Gerasimov 5f96b5c4d0 181: build fix: IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool
now has parameter headless
2018-04-11 16:28:27 +03:00
Alexander Podkhalyuzin f5e0dfaf8c 181: Parameter state in PersistenceStateComponent is not null now in platform 2018-04-11 16:28:26 +03:00
Nicolay Mitropolsky f291873cf8 181: compilation fix when access progressIndicator in ProgressManager by adding !! 2018-04-11 16:28:25 +03:00
Vyacheslav Gerasimov 3dcca14a50 as31: Revert "Quickfix to enable coroutine support works in Maven projects"
This reverts commit 7346fee513.
2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov 78140fb304 as31: Fix compilation JavaRuntimePresentationProvider 2018-04-11 16:28:15 +03:00
Vyacheslav Gerasimov 6bca651848 as31: Fix compilation for Android Studio 2.4 2018-04-11 16:28:14 +03:00
Natalia Selezneva 39d9ac1250 172: Remove textAttributes parameter from EditorCustomElementRenderer:paint 2018-04-11 16:28:10 +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
Nikolay Krasko 49cc4fe3b6 172: Revert 173 specific changes in language injection
Revert "`KotlinLanguageInjector` using Registry to enable annotation injections"
This reverts commit c16a1d598c2bacc849dd16fed974ccdbf8b80754.

Revert "`KotlinLanguageInjector#injectInAnnotationCall` optimization: using `PsiClassNamePatternCondition` to avoid calling `getResolvedCall`"
This reverts commit f9eaaeab61b1dd50de9341846e129b58eb47f247.

Revert "`KotlinLanguageInjector` can inject into files modified for autocompletion"
This reverts commit 7212b22b083023201700696d775355051321b120.

Revert "`KotlinLanguageInjector` understands patterns-injections into Java annotations"
This reverts commit 45847b515bdfd27cfa5d23ff8b9147054ffa6f60.
2018-04-11 16:28:01 +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 9b14e690db Drop only caches for script dependencies when module for scratch file changed 2018-04-10 14:06:54 +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
Vyacheslav Gerasimov 7c02d55b23 Remove explicit jar specification from ide modules build scripts
They often change between ide versions and difficult to maintain
2018-04-09 21:47:48 +03:00
Nikolay Krasko cc14df9e6f Always remove configure notifications without additional checks in tests (KT-23399)
For some reason there were ~1000 tests that were spontaneously
falling (~20%) because they couldn't find some class. It was mostly
Java classes.

Those failures started after cff88a3f8b.

There were group of commits about notifications right before it:
b4fb0e0305b77a0caa83d34edac3253b7d8e082b..1be33b91fa85e50f5048dc5a12604debfa3c19e8

 #KT-23399 Fixed
2018-04-07 03:04:35 +03: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
Yan Zhulanow b3fbec9ec3 Fix EA-117939: Add a read action 2018-04-02 19:17:56 +03:00
Yan Zhulanow c8a1517190 Fix EA-113820: Accept also nullable elements in 'getRelevantElement()' 2018-04-02 19:15:33 +03:00
Yan Zhulanow 966480a155 Debugger: A dirty fix for setting breakpoints inside finally {} in case if exception is thrown from try {} (#KT-22654) 2018-04-02 19:14:28 +03:00
Dmitry Jemerov 8f19e95bd0 Set SDK from JVM module when running JUnit tests for common module 2018-03-29 09:50:34 +02:00
Dmitry Jemerov 6bee25cad2 Reformat 2018-03-29 09:50:34 +02:00
Dmitry Jemerov 20cd193030 Delete remains of external annotations support from compiler 2018-03-29 09:45:07 +02:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Nikolay Krasko 0f441760c2 Refactoring: remove usages of analyzeFully
Function isn't removed because it has usages from other plugins
2018-03-23 17:58:11 +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
Natalia Selezneva a5ac8abc7c Run Script Action should add script dependencies to classpath 2018-03-14 16:09:03 +03:00
Natalia Selezneva 7d76554966 Run script action in IDE should use kotlin compiler from plugin
^KT-22647 Fixed
2018-03-14 16:08:57 +03:00
Natalia Selezneva 2486be0f86 'Configure kotlin' should set 1.2-SNAPSHOT version in build.gradle for snapshot version of kotlin plugin 2018-03-14 16:08:33 +03:00
Nikolay Krasko 48f2fd8607 Add explicit set of supported file types to KotlinPositionManager 2018-03-13 15:52:21 +03:00
Dmitry Jemerov b4fb0e0305 Further reduce number of calls to getConfigurableModulesWithKotlinFiles
Also handle INRE and requeue check
2018-03-13 12:29:16 +01:00
Dmitry Jemerov a29d693dc5 Fix inverted logic of isNotConfiguredNotificationRequired 2018-03-13 12:29:16 +01:00
Dmitry Jemerov fa39cec94b Avoid duplicate scan of modules with Kotlin files (KT-23183) 2018-03-13 12:29:16 +01:00
Nikolay Krasko de68607d5f Refactoring: move JavaResolveExtension.kt to util package 2018-03-05 15:20:53 +03:00
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Renaud Paquay 94ee78c0ca Hitting breakpoint in Kotlin sometimes doesn't work (KT-22205)
Fix KT-22205 and https://issuetracker.google.com/issues/71556313

Hitting breakpoints in Kotlin JUnit test with an Android Gradle
project sometimes(*) does not work in Android Studio 3.1 beta.

(*) The issue is related to various threads running concurrently
with "dumb" mode background code, so the issue reproduces only
on certain configurations.

In a nutshell, the issue is as follows

* On one hand, gradle build finishes, fires an event ("buildFinished")
  that is processed "later" and that causes the IDE to enter "dumb" mode
  for a shot amount of time (about 300-500 msec on a somewhat up to date
  multi-core computer).

* On the other hand, once the JVM of the debuggee is started, breakpoints
  need to be resolved (on the debugger thread, through a call to
  com.intellij.debugger.engine.CompoundPositionManager.createPrepareRequests.
  This code calls into the "KotlinPositionManager.createPrepareRequests",
  which in turns calls into "PerFileAnalysisCache.analyze". That method
  returns "AnalysisResult.EMPTY" is the project is in dumb mode.
  This return value prevents callers from successfully resolving
  the source location into a breakpoint.

Given that the 2 code paths above execute on separate threads without
explicit synchronization, the "failed to resolve breakpoint" issue
occurs sporadically, to the point it happens 100% of the time on
certain configuration.

The fix is so wrap the kotlin breakpoint resolution code inside
a "runReadActionInSmartMode" so that the debugger thread "waits"
for "dumb" mode to terminates before trying to resolve breakpoint
locations.

 #KT-22205 Fixed
2018-03-01 15:41:09 +03:00
Nicolay Mitropolsky fa1d2a891b KotlinLanguageInjector: getNameReference extracted to work with annotations 2018-02-28 17:19:46 +03:00
Nicolay Mitropolsky 08c41474af KotlinLanguageInjector: "kotlin" injections in annotations handled by injectWithCall 2018-02-28 17:19:46 +03:00
Nicolay Mitropolsky fd4f4ef853 KotlinLanguageInjector: support for nested annotations (#KT-21753) 2018-02-28 17:19:46 +03:00
Nikolay Krasko 4c7e46cbf8 Support prefix and suffix in Kotlin injection with comments and annotations (KT-23005)
#KT-23005 Fixed
2018-02-26 18:42:59 +03:00
Nikolay Krasko 08a46c1396 Refactoring: move idea source modules classes to caches/project package 2018-02-26 18:42:58 +03:00
Yan Zhulanow 2fdadb0f5a Evaluator: Send class bytecode array in loop with a limited chunk size (#KT-22967)
JDI in Android has a limited byte buffer size (8192), and we must not exceed it.
2018-02-20 23:19:59 +03:00
Mikhail Glukhikh 84993ec3a0 Resolution API: introduce and use KtElement.resolveToCall() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh 513376e5f0 Introduce KtNamedFunction.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh 5848bc9a44 Introduce KtClassOrObject.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00