Commit Graph

544 Commits

Author SHA1 Message Date
Alexey Sedunov 908bf71ae6 Quick Fixes: Support cross-language "Create from Usage" with Kotlin target 2018-01-16 17:06:53 +03:00
Dmitry Jemerov 560dc920e4 Don't increase nesting level if we aren't processing current expression 2018-01-15 15:03:39 +01:00
Dmitry Jemerov 3a7e4acf22 Reformat and cleanup 2018-01-15 15:03:39 +01:00
Pavel V. Talanov 03a8ce63b2 Scripts: fix any file deletion potentially leading to reindex 2017-12-29 20:14:59 +03:00
Pavel V. Talanov 4890979476 ScriptDefinitionsManager: ignore reloadDefinitionsBy calls
If definitions are not loaded yet
2017-12-19 17:15:39 +03:00
Mikhail Glukhikh 52053695fe Fix variable name validator (take parameters into account) 2017-12-05 15:29:44 +03:00
Alexander Udalov aca74cef0e Replace dependencies on kotlin-reflect with kotlin-reflect-api
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.

Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
2017-11-28 12:35:49 +01:00
Nikolay Krasko 30d8875bdf Check file is valid before search in ScriptDependenciesCache
Otherwise search will fail.
2017-11-24 14:29:02 +03:00
Pavel V. Talanov ae2b0325a3 Restore and deprecate old ScriptTemplatesProvider EP 2017-11-14 16:30:42 +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
Pavel V. Talanov df74fb23f8 ScriptDependenciesCache: limit simultaneously cached script count
Do not schedule updates for dependencies of scripts that were not requested
   (opened in the editor or such) for some time
This fixes a problem when vcs updates changing scripts can trigger
   undesired script dependencies updates
   (probable cause of script files never highlighted correctly in some cases)
Refactor: use VirtualFile instead of String and move code from GradleScriptTemplateProvider
2017-11-14 16:30:28 +03:00
Alexander Udalov 02981038f3 Split core into descriptors, descriptors.jvm, deserialization, descriptors.runtime 2017-11-10 18:58:31 +01:00
Pavel V. Talanov 320c5f6f3a Try to approximate "build.gradle.kts" script dependencies on first access
This is a hacky solution to prevent whole file being highlighted as unresolved while we wait for gradle response
2017-10-17 18:49:48 +03:00
Pavel V. Talanov 1cdac78b32 ScriptDependenciesCache, refactor: use delegated properties 2017-10-17 18:49:40 +03:00
Alexey Sedunov 21bf4d3f24 Rename: Suspend function support 2017-10-10 13:15:15 +03:00
Ilya Chernikov 1862c78bdc Fix projects for gradle integration tests 2017-09-20 11:51:44 +02:00
Ilya Chernikov d039d191f2 Fix tests in the new build infrastructure 2017-09-19 23:58:30 +02:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 336e24b837 Fix project structure after rebase on master 2017-09-19 21:37:25 +02:00
Ilya Chernikov 96d5e0bb21 Refactoring - renaming projects, applying sourceSets DSL 2017-09-19 21:37:18 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Mikhail Glukhikh 6650340716 Migration: expect/actual in OverrideMemberChooserObject 2017-09-15 18:27:40 +03:00
Mikhail Glukhikh 89c8ee8614 Migration: hasImpl -> hasExpectedModifier (OverrideMemberChooserObject) 2017-09-15 18:27:19 +03:00
Stanislav Erokhin c8ee424f67 Rename isHeader to isExpect in descriptors 2017-09-15 18:25:41 +03:00
Stanislav Erokhin 4dc47c734c Rename has[Header|Impl]Modifier() to has[Expect|Actual]Modifier() 2017-09-15 18:25:27 +03:00
Stanislav Erokhin 1ebfe1af43 Refactoring. Replace hasModifier(HEADER_KEYWORD) to hasHeaderModifier() 2017-09-15 18:25:13 +03:00
Mikhail Glukhikh a9ece23e63 Remove BodyResolveMode.FULL from OverrideImplementMembersHandler 2017-09-15 11:15:44 +03:00
Mikhail Zarechenskiy a63495aa0b Use language version settings of definitely known module 2017-09-15 08:16:25 +03:00
Mikhail Zarechenskiy b1d9abdf83 Propagate languageVersionSettings to resolution context 2017-09-14 18:27:34 +03:00
Mikhail Glukhikh 92215b41b9 Replace resolveToDescriptor with unsafeResolveToDescriptor
Now unsafeResolveToDescriptor is equivalent to resolveToDescriptorIfAny
but throws exception in case no descriptor is found.
Old version of resolveToDescriptor is kept intact but made deprecated.
Some clarifying comments were added
2017-09-14 17:20:37 +03:00
Mikhail Glukhikh 71c2489ade Use safe resolveToDescriptorIfAny() when possible (related to EA-105681) 2017-09-14 15:08:04 +03:00
Denis Zharkov b905ddeac9 Memoize deprecations-related computations
It might be helpful for performance as these methods are called
for each resolution candidate and in the same time they scan
the whole overridden tree of a callable member
2017-09-13 15:34:14 +03:00
Alexey Sedunov 8b64a4c8ea Override/Implement: Drop 'impl' modifier for non-impl class members
#KT-18469 Fixed
2017-09-08 15:38:14 +03:00
Alexey Sedunov 6f8503a178 Override/Implement: Do not generate bodies for header class members
#KT-15659 Fixed
2017-09-08 15:38:14 +03:00
Pavel V. Talanov 653314e671 IDE script support: cancel coroutines on project disposal 2017-09-04 16:35:28 +03:00
Pavel V. Talanov 7f361c7579 Add utility for EDT coroutines to be canceled on project disposal 2017-09-04 16:33:31 +03:00
Dmitry Jemerov 6f9869ae11 Remove unnecessary dependency 2017-09-01 11:57:37 +02:00
Pavel V. Talanov 4ada692421 Provide correct resolve scope to binaries in script dependencies
#KT-16760 Fixed
2017-08-29 20:55:20 +03:00
Pavel V. Talanov a120130069 Workaround NonClasspathClassFinder not supporting inner classes
Explicitly split qualified names, can be removed once platform is fixed

 #KT-19310 Fixed
2017-08-29 20:54:25 +03:00
Pavel V. Talanov c132f3b0d1 KT-19276: Drop exception logging on loading script definitions failure
See YT discussion
Have to come up with more meaningful diagnostics on definition loading

#KT-19276 Fixed
2017-08-18 19:11:35 +03:00
Mikhail Glukhikh 3623f581b8 Eliminate a set of warnings, mostly nullability ones 2017-08-18 15:10:27 +03:00
Dmitry Jemerov e3963fccf4 Move Gradle-related classes to idea-gradle module 2017-08-15 16:51:42 +02:00
Mikhael Bogdanov 2954c41848 Fix 'isProjectOrWorkspaceFile' import 2017-08-10 22:05:48 +03:00
Dimach d624ed4aff KT-18482: "Move lambda argument to parenthesis" action generate uncompilable code fixed (#1226)
* KT-18482 fixed

* Moved code to separate method and changed code to cover few more cases.

* Code style fixes.
2017-08-07 15:43:44 +02:00
Nikolay Krasko 6194bc10f8 Move statement out of top-level lambda in scripts (KT-19322)
#KT-19322 Fixed
2017-08-07 12:12:41 +03:00
Yan Zhulanow 45681ed9eb Fix "'Redundant modality' is not reported with all-open" (KT-18195) 2017-08-02 03:35:15 +03:00
Pavel V. Talanov b0b2c046b2 script.runtime 1.1.4: IDE and compiler use 'kotlin.script.experimental' 2017-07-30 18:15:41 +03:00
Pavel V. Talanov c1fd8fc318 Send roots changed iff combined dependencies of all scripts changed
This reduces total number of reindex requests when working with scripts

ScriptDependenciesCache::onChange logic is independent from ScriptDependenciesUpdater::onChange
2017-07-28 15:45:29 +03:00
Pavel V. Talanov e115c8b373 Filter out invalid files before contributing them for indexing
#EA-104574
2017-07-28 15:45:26 +03:00