Ilya Gorbunov
dce0da68c6
Cleanup: post-cleanup after deprecation cleanup in compiler
...
Replace `takeIf { !expr }` with `takeUnless { expr }`.
Cleanup redundant parethesis as in `listOf((expr))`.
Replace `listOf(expr)` with `expr.let(::listOf)` where the former caused significant indentation change.
2017-03-23 16:48:38 +03:00
Nikolay Krasko
c976c3d909
Refactoring: extract common function (some usages were slightly changed)
2017-03-23 13:37:05 +03:00
Alexander Udalov
579238c3be
Remove deprecated declarations from project code, cleanup usages
2017-03-22 20:25:54 +03:00
Simon Ogorodnik
439e158fb2
Fix failing test after migration to IDEA 171
...
BasicCompletionWeigherTestGenerated$ExpectedInfo.testPreferMatchingThis
Looks like IDEA now rearranges elements with same weight by length and
then alphabetically
2017-03-21 16:47:16 +03:00
Simon Ogorodnik
2804264289
Fix regression of completion inside string templates
...
CompletionContributor should not store offsets inside
replacement zone(part of file which are replaced with
dummy identifier) in offsetMap
#KT-16848 fixed
2017-03-20 18:46:11 +01:00
Dmitry Jemerov
61f157e89d
Remove write action around finishLookup(), according to IJ 2017.1 req
2017-03-20 18:45:48 +01:00
Nikolay Krasko
615f9d3a1f
Try to avoid exception in getOffset() call
2017-03-20 18:45:38 +01:00
Dmitry Jemerov
4d10b18fe1
Fix for 171 platform
2017-03-20 18:44:14 +01:00
Valentin Kipyatkov
f00ab135d6
Do not insert redundant space
2017-03-20 19:08:03 +03:00
Valentin Kipyatkov
3ec28f1242
Attempt to preserve partial substitution when detecting expected type for smart completion
2017-03-20 19:08:03 +03:00
Valentin Kipyatkov
b5dd2cc540
Completion of lambda parameters
...
Also changed policy for sorting of smart completion items in basic completion
#KT-16800 Fixed
#KT-12002 Fixed
2017-03-20 19:08:02 +03:00
Pavel V. Talanov
3e7357a5d7
IDELightClassTest: provide tools to check laziness of light class construction
...
StubComputationTracker knows which context was used to construct light class
2017-03-15 20:54:55 +03:00
Pavel V. Talanov
babb3b557d
J2K ImportPath: kotlinify
2017-03-15 20:51:17 +03:00
Simon Ogorodnik
5c4ba53f42
Optimization of Basic Code Completion
...
Now we first search for simple reference variants, then for extensions
Because extension search is slow
#KT-16856
2017-03-15 17:50:29 +03:00
Mikhail Glukhikh
045a23ae10
Cleanup: apply "Convert lambda to reference"
2017-03-15 17:36:02 +03:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Mikhail Glukhikh
d0cc1635db
Cleanup: apply "Use synthetic property access syntax"
2017-03-15 16:13:40 +03:00
Simon Ogorodnik
4e98394c38
Fix Sample reference to resolve cross-module packages correctly
...
Now @sample links to FqName in IDE will be resolved correctly
Cause now we resolve packages over all modules in project
#KT-14710 fixed
2017-03-10 15:33:47 +03:00
Simon Ogorodnik
3bf7223448
Internal Kotlin packages now should be completable in parent packages
...
Internal packages which are hard-excluded from completion and
imports now should be visible there if file package are parent of
excluded one
e.g kotlin.jvm.internal.* now visible from kotlin and kotlin.jvm
#KT-16214 fixed
2017-03-09 19:05:10 +03:00
Ilya Gorbunov
eebb820060
Do not refer to java packages in common completion tests
2017-02-22 17:28:02 +03:00
Denis Zharkov
a3baca829f
Drop KotlinTarget.INNER_CLASS entry
...
In most of the cases it was used together with CLASS_ONLY and vice versa
They only case when CLASS_ONLY was used without INNER_CLASS
is possibleParentTargetMap.COMPANION_KEYWORD.
But after diagnostic NESTED_OBJECT_NOT_ALLOWED has been introduced,
there's no sense in the restriction of exactly the companion's parent
For clarification see test data changed
2017-02-20 13:24:42 +03:00
Alexey Sedunov
2e01f62afe
Kotlin Facet: Detect language/API version by stdlib when "Use project settings" is enabled, but project-level language/api version is not specified explicitly
2017-02-15 14:40:04 +03:00
Simon Ogorodnik
2490318f93
KT-16076 Completion inserts FQN kotlin.text.String
...
KT-14831 Don't add import statement and FQN on converting lambda to reference if typealias is used
KT-16088 Completion wrongly inserts FQN for `kotlin` package
#KT-16076 fixed
#KT-14831 fixed
#KT-16088 fixed
2017-02-13 16:48:14 +03:00
Ilya Gorbunov
fee676a281
Introduce 'takeUnless' function which is like 'takeIf' but with the predicate inverted.
...
#KT-7858
2017-02-13 16:07:34 +03:00
Simon Ogorodnik
be7158eeb2
KT-16110 Missing suspend keyword completion inside generic arguments
...
#KT-16110 fixed
2017-02-07 19:48:05 +03:00
Simon Ogorodnik
c2ba4e3ab9
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-31 15:14:18 +03:00
Ilya Gorbunov
38b79a51d5
Fix tests after introducing exlcusions to default imports of kotlin.js package.
2017-01-30 19:44:51 +03:00
Simon Ogorodnik
d117b0210f
Revert "KT-14252 Completion could suggest constructors available via typealiases"
...
Reverted due problems with tests
This reverts commit 55eeb74c08 .
2017-01-30 16:46:38 +03:00
Simon Ogorodnik
55eeb74c08
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-30 16:24:12 +03:00
Denis Zharkov
88b82d5fa2
Exclude coroutine inrinsics and internal packages
...
#KT-16018
2017-01-30 15:45:02 +03:00
Dmitry Jemerov
720da176db
Exclude keywords from completion if the corresponding feature is unsupported by the language level selected for the module
2017-01-30 12:32:41 +01:00
Dmitry Petrov
77ea0614f9
Fix testData in smart completion test
...
(abbreviation is preserved for 'arrayListOf').
2017-01-30 10:51:47 +03:00
Simon Ogorodnik
b422b0e24d
KT-14722 completion list isn't filled up for typealias to object
...
#KT-14722 fixed
2017-01-28 21:42:39 +03:00
Simon Ogorodnik
2a08e3c679
KT-14767 typealias to annotation class should appear in the completion list
...
#KT-14767 fixed
2017-01-27 21:29:23 +03:00
Mikhail Zarechenskiy
462aed35d3
Don't exclude callable references with type parameters from completion
2017-01-26 14:48:37 +03:00
Simon Ogorodnik
3948c1e007
KT-15153 Support typeAlias extensions in completion and add import
...
#KT-15153 fixed
2017-01-25 20:47:48 +03:00
Simon Ogorodnik
4ca10c61fd
KT-11308 Hide kotlin.jvm.internal package contents from completion and auto-import
...
#KT-11308 fixed
2017-01-25 17:39:36 +03:00
Zalim Bashorov
cd04e794ee
KJS: class MathClass -> object Math
2017-01-23 14:14:13 +03:00
Ilya Gorbunov
3ec48ab244
Add kotlin.comparisons package to default imports.
2017-01-19 18:21:14 +03:00
Ilya Gorbunov
07e529c8ec
Fix completion test: expected appearance of 'takeIf' and 'also'
2017-01-16 09:32:17 +03:00
Denis Zharkov
f611e39a69
Fix return keyword completetion tests
...
Now suspendOrReturn is toplevel, so we should explicitly choose "return" item
2017-01-14 13:24:53 +03:00
Simon Ogorodnik
0cf02dcb7b
KT-15092 Suppress inspection "use property access syntax" for some getters and fix completion for them
...
#KT-15092 fixed
2017-01-12 14:53:38 +03:00
Ilya Gorbunov
eb07d9407d
Unexpected appearance of minOf/maxOf for T: Comparable<T> in smart completion tests
2017-01-11 14:42:36 +03:00
Ilya Gorbunov
18245c5b73
Expected appearance of minOf/maxOf for T: Comparable<T> in one of smart completion tests
2017-01-11 14:42:36 +03:00
Mikhail Zarechenskiy
6cccad9647
Update year in license and regenerate tests
2017-01-10 12:01:17 +03:00
Stanislav Erokhin
ab53978793
Allowed ast access for some tests.
2016-12-16 00:57:04 +03:00
Stanislav Erokhin
5a353412e4
Fixed KeywordCompletionTests.
2016-12-15 23:58:18 +03:00
Dmitry Petrov
8e3fd0efc3
If the last argument of a function is a suspend function,
...
suggest trailing lambda variant in completion.
2016-12-15 23:58:14 +03:00
Stanislav Erokhin
0132f3eea7
Remove kotlin.coroutine package from default imports.
2016-12-15 23:57:51 +03:00
Dmitry Petrov
a15d423db4
Support modifiers on types in parser
...
(required for 'suspend' on functional types).
TYPE_REFERENCE element now has MODIFIER_LIST child, which hosts annotations and modifiers for the corresponding type reference.
Annotations and modifiers written before an extension function type are now parsed as annotations and modifiers for the functional type, not the receiver type.
So, '@Ann A.(B) -> C' was '(@Ann A).(B) -> C', and became '@Ann (A.(B) -> C)'.
NB: DSL_SCOPE_VIOLATION testData updated accordingly.
Type projection variance modifiers ('in', 'out') belong to a separate modifier list under corresponding type projection (not under a type reference).
'A<in suspend T>' is 'A<(in (suspend T))>', 'A<suspend in T>' is an error.
In stub builder, create a modifier list node to host annotations and modifiers (none so far; TODO properly serialize/deserialize types with modifiers).
2016-12-15 23:57:41 +03:00