Commit Graph

764 Commits

Author SHA1 Message Date
Dmitry Petrov 2b63c6a2d5 Merge branch 'typealias_completion' of https://github.com/cypressious/kotlin into cypressious-typealias_completion 2016-07-28 18:07:43 +03:00
Pavel V. Talanov cdbd7fbab0 Refactor: split classes in 'asJava' package into several subpackages to reflect their structure 2016-07-28 18:00:47 +03:00
Nikolay Krasko 097288d15f Refactoring: fix weak warning about unnecessary escaped dot 2016-07-28 15:33:43 +03:00
Mikhail Glukhikh 6e391854a0 Data flow values refactoring: removed DataFlowValue.kind.isStable, renamed DataFlowValue.isPredictable -> DataFlowValue.isStable 2016-07-28 15:14:48 +03:00
Kirill Rakhman f378089b96 Fix Completion: keyword 'typealias' is not suggested
Fixes #KT-13242
2016-07-27 19:02:08 +02:00
Mikhail Glukhikh 692623cb55 Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X) 2016-07-27 16:24:18 +03:00
Alexander Udalov 969ff43152 Merge CallableReferencesResolutionUtils.kt into DoubleColonExpressionResolver 2016-07-22 11:05:19 +03:00
Mikhail Glukhikh 90c6868f9b renderDataFlowValue() moved to test from completion 2016-07-21 21:15:31 +03:00
Mikhail Glukhikh 9001b9bcc0 DataFlowValue & DataFlowValueFactory major refactoring, get rid of DataFlowValue.id : Any?
Instead, DataFlowValue now requires IdentifierInfo implementation to be created
DataFlowValue is compared using IdentifierInfo
2016-07-21 21:15:05 +03:00
Dmitry Jemerov ef0318e038 more testdata updates due to default function template change 2016-07-20 10:44:54 +02:00
Valentin Kipyatkov cc6b1faddd Minor 2016-07-19 20:35:31 +03:00
Valentin Kipyatkov cd5ffa5895 "class" and "class.java" should be available after expression too 2016-07-19 20:35:31 +03:00
Valentin Kipyatkov a25841e9c7 Smart completion for bound callable references 2016-07-19 20:35:31 +03:00
Valentin Kipyatkov e05aa41bbc Completion and import popup for bound callable references 2016-07-19 20:35:31 +03:00
Denis Zharkov 2cc09f928e Allow suspend extensions for specially annotated controllers 2016-07-06 15:25:19 +03:00
Alexey Sedunov ffe4e760d7 Override/Implement: Implement JavaDoc/KDoc copying
#KT-8682 Fixed
 #KT-12735 Fixed
(cherry picked from commit f4486be)
2016-06-28 15:07:19 +03:00
Alexander Udalov 3eeccb407e Simplify and fix createReflectionTypeForCallableDescriptor
Previously its call sites needed to determine if the receiver type should be
ignored (e.g. if the reference is to static member or nested class constructor,
or if it's a bound reference), and 3 of 4 callers did it incorrectly. Simplify
this by passing the DoubleColonLHS instance everywhere.

Also rename it to createKCallableTypeForReference

 #KT-12738 Fixed
 #KT-12751 Fixed
 #KT-12799 Fixed
2016-06-22 21:35:57 +03:00
Alexander Udalov 80bf6e1bee Refactor CallableReferencesResolutionUtils.kt
Get rid of trace & reportOn parameters of
createReflectionTypeForCallableDescriptor: move the two checks that required
them to DoubleColonExpressionResolver and combine with other checks into a
single function that checks the validity of the referenced symbol. This also
makes these checks reported only once when invalid expressions are passed as
function arguments (previously they were also reported from
getResolvedCallableReferenceShapeType).

Also inline getReflectionTypeForCandidateDescriptor after this, and refactor
its usages
2016-06-22 21:35:57 +03:00
Pavel V. Talanov bafe8e55ce Create SyntheticMemberDescriptor interface
Implement this interface by sam adapters/constructors and use it in navigation

 #KT-11708 Fixed
2016-06-20 20:15:34 +03:00
Valentin Kipyatkov 0bc5007147 KT-12369 Completion: pressing dot after class name should not cause insertion of constructor call
#KT-12369 Fixed
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov b9719bfe82 Fixed test so that it really tests what's intended 2016-06-20 16:19:02 +03:00
Valentin Kipyatkov eb1dbfc652 KT-12669 Completion should show variant with () when there is default lambda
#KT-12669
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov 962a8f9bf4 KT-12447 Don't use CompletionProgressIndicator in Kotlin plugin
#KT-12447 Fixed
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov 4e16d67321 KT-12427 Completion doesn't work for "@receiver:" annotation target
#KT-12427 Fixed
2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 1413a3fe63 KT-12328 Qualified function name inserted when typing before "if"
#KT-12328 Fixed
2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 2ec81f44bf Fixed extension properties not completed after "get" 2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 88bf7f883e No need to specially handle extensions from current file anymore (since searchScope for KotlinIndicesHelper includes current file) 2016-06-20 16:19:01 +03:00
Alexander Udalov 6562a2db19 Type-check reference to property with invisible setter to KProperty
#KT-12337 Fixed
2016-06-19 12:45:22 +03:00
Stanislav Erokhin 3a451744c5 Introduce KotlinTypeFactory 2016-06-09 12:57:43 +03:00
Denis Zharkov b8d4d39f4d Add custom applicability checks for suspend/coroutine modifiers 2016-06-08 18:53:16 +03:00
Denis Zharkov 5c1e17c8e7 Revert "Completion fix for reserved 'async' syntax"
This reverts commit 318f0c89b2.
2016-06-08 18:53:16 +03:00
Denis Zharkov 329fb9d619 Introduce 'coroutine'/'suspend' modifiers 2016-06-08 18:53:16 +03:00
Alexander Udalov 1339286261 Drop undocumented absolute name specification feature with 'package.' 2016-06-01 19:30:03 +03:00
Alexander Udalov ca76e4d426 Support new double colon expressions in IDE code 2016-05-26 22:22:41 +03:00
Ilya Gorbunov a0e8ed7186 Revert: Disable check for "Access to tree elements not allowed in tests" in completion tests. 2016-05-16 20:54:00 +03:00
Stanislav Erokhin f376c418dc Fix SOE related exact annotation and completion 2016-05-16 18:32:16 +03:00
Valentin Kipyatkov e8d518a28f KT-9166 Code completion does not work for synthetic extensions on typing "g"
#KT-9166 Fixed
2016-05-14 12:19:42 +03:00
Valentin Kipyatkov e04c6d1f5c KT-12299 Completion: incorrect priority of property foo over method getFoo in Kotlin-only code
#KT-12299 Fixed
2016-05-14 12:19:42 +03:00
Valentin Kipyatkov 97ad0d5c86 KT-12124 No code completion for a java property in a specific position
#KT-12124 Fixed
2016-05-14 12:19:41 +03:00
Valentin Kipyatkov f6c8ac70fc Moved method getSmartCastVariantsWithLessSpecificExcluded() into IDE 2016-05-14 12:19:41 +03:00
Valentin Kipyatkov fe2953090e Added test for KT-12124 2016-05-14 12:19:40 +03:00
Valentin Kipyatkov dd16eb14e5 KT-12080 Move parameter names higher up in code completion
#KT-12080 Fixed
2016-05-12 22:22:46 +03:00
Alexey Sedunov 4a65b1c65c Code Insight: Support file path references inside of Kotlin string literals
#KT-11704 Fixed
2016-05-12 13:03:02 +03:00
Dmitry Jemerov 42ba14328c move KDoc-related logic shared between IDEA and Dokka to ide-common module 2016-05-10 15:00:15 +02:00
Dmitry Jemerov 94c241443b support @receiver KDoc tag; somewhat more precise tag name completion 2016-05-06 22:11:50 +02:00
Valentin Kipyatkov 16c38a2415 KT-12138 Do not show "::error" in smart completion when any function type accepting one argument is expected
(actually made them lowest priority)

 #KT-12138 Fixed
2016-05-04 17:28:30 +03:00
Valentin Kipyatkov 81e4114c5a Minor 2016-05-04 17:28:29 +03:00
Valentin Kipyatkov 941b415981 KT-12150 Smart completion suggests to compare non-nullable with null
#KT-12150 Fixed
2016-05-04 17:28:29 +03:00
Valentin Kipyatkov 40900b0050 No explicit runWriteAction required 2016-05-04 17:28:29 +03:00
Valentin Kipyatkov 0769c5453f KT-12103 Smart completion for nested SAM-adapter produces short unresolved name
#KT-12103 Fixed
2016-05-04 17:28:29 +03:00