Commit Graph

599 Commits

Author SHA1 Message Date
Roman Golyshev 2c12d26d28 KT-18538 Unwrap fake override in ShortenReferences
- Fake override prevents reference shortener from shortening of static
methods declared in the class bases when they are located not in
direct parent of the class (for example, in grand-
or grand-grand-parent)
- The completion uses descriptor with unwrapped fake override when it
performs the insertion. It leads to inserting the name of the base which
actually contains the static method instead of the direct parent class.
Now, when reference shortener compares unwrapped descriptors, this
problem should be fixed during insertion handling
2020-06-01 08:59:37 +00:00
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00
Roman Golyshev 90750483ee KT-36860 Collect extensions from object on first completion
- This should not affect the performance of the completion, since all
object extensions are collected on the last step, when all main variants
are already collected
- Add more tests
- Also, disable completion of extensions from objects as callable
references (^KT-37395 Fixed)
- ^KT-36860 Fixed
2020-03-11 13:31:56 +03:00
Abduqodiri Qurbonzoda e19c0c9768 Update idea-completion testData after introducing vararg maxOf/minOf 2020-02-27 02:24:49 +03:00
Abduqodiri Qurbonzoda fe50bb4b93 KProperty and ReadOnlyProperty type parameter names #KT-16529 2020-02-26 17:34:03 +03:00
Roman Golyshev 3461effd47 KT-33372 Remove renaming file reference to the contents of the file
- There is still a hack with returning null from `getLastFileReference`,
it is here to keep KT-25674 issue fixed
- Overrides of `bindToElement` are removed, they caused renames of the
file references to their contents
- Code of `KotlinFilePathReferenceContributor.kt` is refactored
- ^KT-33372 ^KT-32514 ^KT-36306 Fixed
2020-02-16 17:08:11 +03:00
Ilya Gorbunov c37a2d3dc3 Fix completion test: add coroutines-compat jar dependency
Related to KT-34582
2020-01-29 09:12:43 +03:00
Nikolay Krasko f01b4706d1 Switch to 193 platform 2020-01-19 12:01:53 +03:00
Mikhail Zarechenskiy 547865d5c7 Fix tests for completion after fun keyword
It's correct from the current implemention but still questionable and
 should be discussed

 #KT-35990 Open
2020-01-17 19:37:48 +03:00
Roman Golyshev 4b50fb18fb KT-35258 Add better completion for MixedNamedArgumentsInTheirOwnPosition feature
- When named parameter is on its own position, the completion of the next argument will not be limited by named arguments only
- The completion will not suggest already used arguments names
- ^KT-35258 Fixed
2020-01-17 12:06:08 +03:00
Roman Golyshev 42deb7db48 KT-34582 Exclude kotlin.coroutines.experimental package from completion and auto-import
- Exclusion happens only when `ReleaseCoroutines` feature is supported
- Add `LANGUAGE_VERSION` to few tests to make sure that previous exclusions still work when `experimental` package is not excluded entirely
- ^KT-34582 Fixed
2019-12-29 15:35:49 +03:00
Toshiaki Kameyama ba640be81d KT-32178 Keyword completion: don't add 'fun' after 'suspend' in type position
#KT-32178 Fixed
2019-12-19 15:07:20 +03:00
Roman Golyshev 66ffdf1b2d KT-33979 KT-34150 Remove filtering overridden object members and nested objects
- ^KT-33979 Fixed
- ^KT-34150 Fixed
- Also, in extension completion check descriptor instance first
2019-12-03 13:29:30 +03:00
Roman Golyshev 3112d70420 KT-35042 Fix InsertHandlerProvider.kt to work with suspend functional parameters
- ^KT-35042 Fixed
- Also, fix review suggestions for KOTLIN-CR-3495
2019-11-29 14:55:22 +03:00
Roman Golyshev 6f234beb9c KT-34414 Make sure completion for suspend functional parameters works too
- Replace `isFunctionType` with `isBuiltinFunctionalType` where it is relevant
- ^KT-34414 Fixed
2019-11-29 14:55:21 +03:00
Roman Golyshev faf4c05fc8 KT-34644 Give return keyword more priority in completion where appropriate
- See `returnExpressionItems::returnIsProbableInPosition` to get an idea where return is supposed to be more appropriate
  - End of the block (except for top level block of unit function or cycle) or as single expression in if or when
  - Right side of the elvis operator (which is not already in return)
- Add additional `probable_keyword` weigher to signalize about probable keyword (for now it is only for `return`)
- ^KT-34644 Fixed
2019-11-26 11:56:32 +03:00
Nikolay Krasko 394a812329 Re-mute completion tests (KT-32919) 2019-11-22 22:12:37 +03:00
Toshiaki Kameyama 4d9b19da82 Remove comments from function/property implementation template
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
Roman Golyshev e89a87b2e3 KT-29926: Support completion of suspend lambda body and parameters
- ^KT-29926 Fixed
2019-11-08 19:24:05 +03:00
Roman Golyshev da4097f488 KT-29926: Support completion of suspend lambda parameters in the body
- `suspendLambdaSignature` directory is just a copy of `lambdaSignature`
2019-11-08 19:24:05 +03:00
Alexander Podkhalyuzin d2ae39489f SmartPointers in Smart Completion for anonymous object generation
#KT-32615 Fixed
2019-11-05 17:51:34 +03:00
Nikolay Krasko 7e5316b9f1 Fix completion test for Java in 193
It looks like java completion doesn't use () anymore.
2019-10-31 11:11:50 +03:00
Roman Golyshev 3661dedacf KT-31762: Fix completion in enum entries constructors
- The issue was caused by incorrect parsing of enum entry because of `$` in the `KotlinCompletionContributor::DEFAULT_DUMMY_IDENTIFIER`
  - Incorrect parsing caused arguments next to completed one to be recognized as another enum entries
- Change `KotlinCompletionContributor::isInClassHeader` to accept classes without bodies, so identifier without `$` is used inside enum entries constructors
- ^KT-31762 Fixed
2019-10-29 12:35:13 +03:00
Roman Golyshev 6560ecc82b KT-15286: Provide object member extensions in the completion
- Add extensions only when completion of static members is enabled (double ctrl + space and nonempty prefix)
- Add full import for callables with receiver in `LookupElement.decorateAsStaticMember`
2019-10-18 17:17:28 +03:00
Nikolay Krasko 030aaee117 Mute completion tests (KT-32919) 2019-10-03 12:24:46 +03:00
Nikolay Krasko 2ec231f381 Minor: fix CompletionMultiFileHandlerTest test 2019-09-30 13:38:27 +03:00
Dmitry Gridin c185cecb40 Completion: fix shortening of fully qualified name for case of conflicts between property and function
#KT-31902 Fixed
#KT-33937 Fixed
2019-09-27 17:52:11 +07:00
Alexander Podkhalyuzin 9a2da67919 ShortenReferences: cleanup code & add tests for property-function conflicts 2019-09-27 17:52:11 +07:00
Roman Golyshev 0239229dfc KT-33903: consider imports from objects when removing descriptors duplicates
- `ImportedFromObjectCallableDescriptor` and descriptors in general do
not have consistent `equals`,  which leads to duplication in completion
when multiple functions from objects are imported, or when function is
visible in some scope both implicitly and by import (see KT33903_1.kt)
- ^KT-33903 Fixed
2019-09-26 18:23:04 +03:00
Alexander Podkhalyuzin cdebd6bc05 Fixed testdata as Enter shouldn't override completion 2019-09-26 16:25:50 +03:00
Alexander Podkhalyuzin d018489621 Fixed testdata
JS stdlib contains more classes now, so we need to filter them out
2019-09-26 16:25:50 +03:00
Dmitry Gridin 5dddc464a5 Completion: add tests for case with overloaded function with lambda with receiver parameter
Relates to #KT-31073
2019-09-23 23:20:26 +07:00
Roman Golyshev b422485440 KT-30996: Use the last receiver to complete dsl methods
- change `detectReceiverTypes` return type to `List` instead of `Collection`
  - it reflects that receiver types are actually ordered
  - did not propagate signature changes to all possible places because it creates too much noise in git history
- ^KT-30996 Fixed
2019-09-13 15:52:52 +03:00
Roman Golyshev 9a938b07ba KT-17689: Fix TypeAliasQualifier to provide enum entries descriptors
- this adds enum entries to the completion on the typealiases
- we cannot use `unsubstitutedInnerClassesScope` instead of `EnumEntriesScope` because it allows to complete things that are not allowed to be resolved by the Kotlin compiler; see `EnumEntriesScope` doc for details
- ^KT-17689 Fixed
2019-09-06 12:11:23 +03:00
Dmitry Gridin a843c23f20 Completion: add root prefix support
#KT-10340 Fixed
2019-09-05 18:01:23 +07:00
Vladimir Dolzhenko 2d5a1e19d0 Perform GC between performance test runs, add geometric mean calculation and close stats in the end 2019-07-30 11:59:33 +02:00
Vladimir Dolzhenko 022275b781 Do not invalidate package caches on generic events, KT-25264 2019-07-19 09:14:26 +02:00
Igor Yakovlev a9aa60491e Fix UL-classes test renders and test data 2019-07-12 16:33:51 +03:00
Max Medvedev 5d35bebacd Keyword completion: use proper prefix matcher for keyword completion
fixes #KT-32519
2019-07-10 15:54:44 +03:00
Toshiaki Kameyama 3a77b63c85 Completion: don't propose the same name for arguments of lambda (KT-9792)
#KT-9792 Fixed
2019-06-29 20:36:55 +03:00
Igor Yakovlev 2a729082a0 Add UltraLightFacadeClassTest 2019-06-03 17:23:41 +03:00
Igor Yakovlev 33126b273c Update StubTracker test data for completion tests 2019-05-13 11:21:11 +03:00
Mikhail Zarechenskiy c03dfd1522 [IDE-NI-MIGRATE] Migrate completion tests for new inference 2019-05-06 13:59:26 +03:00
Yan Zhulanow fb3efd2d78 Debugger: Fix completion for synthetic '_field' extension properties (KT-23586) 2019-04-11 17:46:14 +03:00
Toshiaki Kameyama 17a4506575 Keyword completion: complete data class with parentheses
#KT-30511 Fixed
2019-04-02 11:48:47 +03:00
Toshiaki Kameyama dfd3947856 Keyword completion: add 'fun' after 'suspend' (KT-29038)
#KT-29038 Fixed
2019-03-14 15:35:45 +03:00
Toshiaki Kameyama fd262bcd8d Smart completion: fix anonymous object code style (KT-29572)
#KT-29572 Fixed
2019-03-14 15:35:44 +03:00
Toshiaki Kameyama 8cdf901538 Keyword completion: do not suggest const except inside top level or object
#KT-23026 Fixed
#KT-29840 Fixed
2019-02-19 14:57:44 +03:00
Nikolay Krasko c968a362f6 Fix test data after file rename 2019-01-06 01:08:25 +03:00
Toshiaki Kameyama 827e04ae3e Keyword completion: add "class/interface/object + filename" completion for top level (KT-28394)
#KT-28394 Fixed
2019-01-05 19:06:22 +03:00