Commit Graph

990 Commits

Author SHA1 Message Date
Mikhael Bogdanov ea407aba32 Support custom options in quick fix test framework 2018-04-09 18:13:36 +02:00
Alexander Podkhalyuzin 5a752da9e9 Updated tests #KT-23546 Comment 2018-04-06 16:25:09 +03:00
Alexander Podkhalyuzin 9667214b64 Fixed formatting 2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin e4dfa5897f Do not show duplicated names in variables completion list
#KT-23546 Fixed
2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin fe680da3f9 Better formatting of BasicCompletionSession 2018-04-06 16:25:08 +03:00
Alexander Podkhalyuzin 0231a3a9e6 Do not show autopopup variable name completion if it was closed
#KT-23546 Comment
2018-04-06 16:25:07 +03:00
Pavel V. Talanov c3d2334eed Fix expect declarations available in completion in platform modules 2018-04-04 17:56:35 +02:00
Pavel V. Talanov 549bebbd19 Add test infrastructure for completion in mpp
Allow to specify specific expected module in test data for completion items
2018-04-04 17:56:35 +02:00
Zalim Bashorov 9970dd051f Fix copyright's start year in generated tests 2018-03-14 15:04:58 +03:00
Simon Ogorodnik 48fb3db7ba Fix inserting variable name suggestion on non-enter char typing
#KT-21933 fixed
2018-03-13 12:51:29 +03:00
Nikolay Krasko de68607d5f Refactoring: move JavaResolveExtension.kt to util package 2018-03-05 15:20:53 +03:00
Alexey Sedunov 30314d43d9 Shorten Reference: Disable ${...} shortening inside completion insert handler 2018-03-01 17:41:10 +03:00
Pavel V. Talanov a6aea5625a Dsl completion: fix completion when multiple receivers are in scope 2018-02-28 19:48:45 +01:00
Nikolay Krasko 08a46c1396 Refactoring: move idea source modules classes to caches/project package 2018-02-26 18:42:58 +03:00
Nikolay Krasko 287ad512fb Refactoring: extract project structure caches to separate package 2018-02-26 18:42:57 +03:00
Nikolay Krasko 9b8e550f3b Refactoring: move util files 2018-02-26 18:42:57 +03:00
Pavel V. Talanov cf6fd4da81 Completion: prevent lookup elements from being duplicated correctly
This code prevents completion items from being submitted several times for the same descriptors
But some contributors actually do contribute extra items for already processed descriptors

Fixes a problem introduced in 1796d40118
2018-02-22 20:32:54 +01:00
Pavel V. Talanov 92070d132e Completion: do not force dsl members to the top if some type is expected 2018-02-21 14:44:14 +01:00
Pavel V. Talanov 1796d40118 Completion: assign highest priority to dsl members in dsl context
Use the same style as for dsl for lookup items that belong to dsl
2018-02-21 14:44:13 +01:00
Pavel V. Talanov 8600add7f7 Refactor: extract utils related to DslMarker to a separate object 2018-02-21 14:44:08 +01:00
Nikolay Krasko 882913c773 Fix getting fields after introducing KotlinCommonCodeStyleSettings 2018-02-14 13:27:10 +03:00
Alexander Udalov ac5444ef7c Add declaresOrInheritsDefaultValue, move hasDefaultValue to 'resolution'
'hasDefaultValue' needs to be adapted to support locating default values
in 'expect' functions, and this is not possible in module 'descriptors',
where it was originally declared. Therefore, move it to module
'resolution' and copy its current logic to a separate function
'declaresOrInheritsDefaultValue' which is used in 5 places.
'hasDefaultValue' itself is updated in subsequent commits.

Besides changing imports, also use a simpler declaresDefaultValue in
some places, which does not include default values inherited from
supertypes: this is OK for constructors, and in LazyJavaClassMemberScope
for functions from built-ins which do not have default argument values
at all
2018-02-05 13:38:04 +01:00
Ilmir Usmanov 18c03f94f8 Move coroutineContext to correct package
from kotlin.coroutines.experimental.instrinsics to kotlin.coroutines.experimental

 #KT-22400
2018-02-01 13:18:32 +03:00
Mikhail Glukhikh babcea9edc Fix completion test (companion object is allowed in annotation scope) 2018-01-31 14:44:33 +03:00
Alexey Sedunov a752f3f38e Misc: Rename class 2018-01-17 12:54:39 +03:00
Kirill Rakhman b567817d1f Make completion for overriding functions respect suspend modifier
Fixes #KT-22200
2018-01-16 15:42:03 +01:00
Nikolay Krasko adf6ad6283 Check file before cast in KotlinCompletionContributor (EA-101984) 2018-01-15 14:05:50 +03:00
Dmitry Jemerov e80dae1802 Update copyright in generated tests 2018-01-10 11:55:28 +01:00
Dmitry Jemerov 0ca2117ac7 Remove the usages of some of the deprecated APIs 2018-01-09 18:43:11 +01:00
Alexander Podkhalyuzin 8203d1c3fe Extracted Kotlin.JVM IDE into separate module
This change is required to have possibility to build plugin against
minor IDEs, which don't have Java. So we want to extract idea-jvm
2017-12-21 18:34:02 +03:00
Alexey Sedunov c8d9f9ac50 Refactoring: Rename copyable property delegates for PsiElement 2017-11-29 12:00:25 +03:00
Mikhail Glukhikh dce7377099 Revert check on module descriptor validness in lookup
Related to KT-20986
2017-11-18 12:35:01 +03:00
Pavel V. Talanov 8696b37cdb Minor, tests: make collection synchronized
Attempt to fix flaky test test that use LightClassComputationControl
2017-11-14 17:47:55 +03:00
Toshiaki Kameyama 27e7f13335 Fix AssertionError on completing after template in string literal
#KT-16402 Fixed
2017-11-13 16:01:34 +03:00
Mikhail Glukhikh 1e940bde01 Lookup element factory: do not use outdated descriptor
Probably #KT-20986 Fixed
2017-11-13 14:10:58 +03:00
Simon Ogorodnik d6143e2af6 Fix testData broken after KT-12797 2017-10-31 21:11:19 +03:00
Simon Ogorodnik 213ce01152 Update testData for completion, broken after KT-13220 2017-10-30 17:31:15 +03:00
Simon Ogorodnik 8631e898a7 KT-12797: Fix completion to show inner classes from base class
#KT-12797 fixed
2017-10-25 18:07:37 +03:00
Simon Ogorodnik 5778ace6b0 KT-20166: Replace type name when caret is at the end of param name
When caret is at the end ('f<caret>: Foo'), tokenAt was COLON,
not IDENTIFIER

#KT-20166 fixed
2017-10-25 18:07:01 +03:00
Simon Ogorodnik cace6624e6 EA-105522, KT-20256: Fix TextRange.<init> "Invalid range specified"
Check when caret inside template, and don't try to create invalid
range then

 EA-105522 fixed
 #KT-20256 fixed
2017-10-23 17:32:39 +03:00
Simon Ogorodnik 7a991ddc25 KT-13220: Add completion for variable names
Using parameter name completion

#KT-13220 fixed
2017-10-18 19:11:13 +03:00
Alexey Sedunov b8fb002a8f Misc: Update keyword completion test data
It reflects top-level lateinit variables available since 1.2
2017-10-18 18:17:50 +03:00
Simon Ogorodnik 4972dbfc2d KT-17165: Support array literals in annotations in completion
#KT-17165 fixed
2017-10-12 18:15:53 +03:00
Denis Zharkov 12b348ae48 Fix incorrectly configured IDE tests
The important changes are in ideaTestUtils.kt:
`configureByFiles` must be called on the relative to testData dir path,
otherwise java files in the project belong to src/idea/testData/.../A.java
instead of src/A.java and can't be found in the root package

New updates in resolution when resolving A() call is now asking whether
<root>.A exists in PsiPackage::getClasses instead of
PsiPackage::findClassByShortName that can find a class even if it's located
in the wrong directory
2017-09-28 14:01:30 +03:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Mikhail Glukhikh ef6a00f477 Fix completion tests 2017-09-19 17:13:37 +03:00
Mikhail Glukhikh 27615209ed Migration to expect/actual: remove header/impl from completion, tests 2017-09-15 18:28:43 +03:00
Mikhail Glukhikh 62ec4b5a31 Migration to expect/actual: KeywordCompletion 2017-09-15 18:27:05 +03:00
Mikhail Glukhikh 71c2489ade Use safe resolveToDescriptorIfAny() when possible (related to EA-105681) 2017-09-14 15:08:04 +03:00
Dmitry Petrov ea91a0794d Allow modifier 'inner' on a class nested in enum entry class 2017-09-11 09:42:18 +03:00