Commit Graph

110 Commits

Author SHA1 Message Date
Toshiaki Kameyama
a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Alexey Sedunov
908bf71ae6 Quick Fixes: Support cross-language "Create from Usage" with Kotlin target 2018-01-16 17:06:53 +03:00
Alexey Sedunov
84c6f9bf45 Create from Usage: Fix choosing superclass for abstract member
This applies to cases when non-existing member is called without
explicit receiver

 #KT-21332 Fixed
2017-11-30 12:49:25 +03:00
Alexey Sedunov
eda747c0bf Minor: Fix tests 2017-07-19 11:34:30 +03:00
Alexey Sedunov
e9bf1d2ab8 Create from Usage: Add test for KT-17537
#KT-17537 Fixed
2017-07-17 16:09:53 +03:00
Alexey Sedunov
2e76a76088 Control Flow: Fix CFG usage info for double-colon expressions
#KT-12551 Fixed
 #KT-17092 Fixed
2017-07-17 16:09:51 +03:00
Alexey Sedunov
26d6088c82 Create from Usage: Infer expected type for lambda body
#KT-18186 Fixed
2017-07-17 16:09:49 +03:00
Mikhail Glukhikh
d08b18f5f8 Introduce "use expression body" inspection #KT-16063 Fixed
Converted from the relevant intention
Reported cases: one-liners, whens
Also, more exact caret detection in local inspection tests
2017-07-07 18:15:06 +03:00
Valentin Kipyatkov
92a763552c KT-17970 Intention actions to format parameter/argument list placing each on separate line
#KT-17970 Fixed
2017-05-19 12:20:51 +03:00
Mikhail Glukhikh
382bf9a500 ConvertReferenceToLambda status refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
2017-05-10 14:56:38 +03:00
Kirill Rakhman
406bac684c Fix Quickfix for missing operator adds infix modifier to created function (#1012)
Fixes #KT-14907
2017-01-09 12:03:22 +01:00
Nikolay Krasko
2bb48fc802 Allow empty single-line bodies in property accessors 2016-12-14 13:40:44 +03:00
Alexey Sedunov
2a594a5bcc Create from Usage: Support generation of abstract members for superclasses. Skip non-abstract superclasses when generating abstract member
#KT-14019 Fixed
2016-12-02 14:14:05 +03:00
Mikhail Glukhikh
b111d1ba69 Convert reference to lambda intention introduced #KT-13393 Fixed 2016-11-24 15:26:18 +03:00
Alexey Sedunov
2ff8e922f0 Create from Usage: Add test for KT-14500 2016-11-07 20:03:37 +03:00
Alexey Sedunov
e8b5387384 Create from Usage: Support array access expressions/binary expressions with type mismatch errors
#KT-14501 Fixed
2016-11-07 20:03:35 +03:00
Valentin Kipyatkov
3bd39df587 No parameter names in types for error messages 2016-10-11 23:38:50 +03:00
Valentin Kipyatkov
41ee06ec96 Use parameter names in DescriptorRenderer 2016-10-11 23:38:49 +03:00
Alexey Sedunov
da1178fe0c Create from Usages: Do not suggest on type-mismatched expressions which are not call arguments
#KT-14143 Fixed
2016-10-07 20:20:35 +03:00
Valentin Kipyatkov
21c2268f70 Protection against "<caret>" missing in test data
Many incorrect tests fixed
2016-09-27 18:05:26 +03:00
Mikhail Glukhikh
9ad820205e Partial build fix (new convert to expression body opportunity in quick-fixes) 2016-09-19 10:37:39 +03:00
Alexey Sedunov
c2b38cfa41 Create from Usage: Place extension properties after the usage and generate stub getter
#KT-11795 Fixed
2016-08-18 19:15:38 +03:00
Alexey Sedunov
99ba340236 Create from Usage: Make extension functions/properties 'private' by default
#KT-11799 Fixed
2016-08-18 19:15:37 +03:00
Alexey Sedunov
562488b348 Create from Usage: Disable "Create property" (non-abstract) in interfaces. Make "Create function" (non-abstract) generate function body in interfaces
#KT-13365 Fixed
2016-08-17 11:49:52 +03:00
Dmitry Jemerov
a979c7e1d7 ugly fix for failing tests. without the string template, KotlinFilePathReferenceContributor injects a file reference into the string literal, and an unrelated intention (AddAnnotationIntention) tries to resolve it. resolving the reference caches the default contexts in FIleReferenceSet, which caches the order entries of a module in an OrderRootsCache. this creates VirtualFilePointers which are for some reason not disposed properly. 2016-07-23 21:18:26 +02:00
Alexander Udalov
5a6237b357 Refactor resolution of double colon expression LHS
Try resolving the LHS only when it looks (PSI-wise) like it could represent a
type element. This, for example, allows "illegal selector" error to be reported
on weird expressions like '""?.""::class'.

Also remove expression text from the "illegal selector" diagnostic, it's not
needed and can screw up the error message if the text is too big
2016-07-22 11:05:19 +03:00
Alexey Sedunov
ae06f01c95 Create from Usage: Approximate unresolvable types
#KT-7722 Fixed
(cherry picked from commit 917cd22)
2016-07-20 16:36:12 +03:00
Alexey Sedunov
a1e86e8bfa Create from Usage: Show target class name in the text of "Create member" quick fix
(cherry picked from commit a51d3fc)
2016-07-20 15:39:19 +03:00
Alexey Sedunov
1a13c21377 Create from Usage: Show receiver type in the text of "Create extension" quick fix
(cherry picked from commit c0d5df1)
2016-07-20 15:39:13 +03:00
Alexey Sedunov
2abcd17713 Create from Usage: Support "Create member/extension" corresponding to the extension receiver of enclosing function
#KT-10668 Fixed
(cherry picked from commit bc4c013)
2016-07-20 15:39:09 +03:00
Alexey Sedunov
49b6811b44 Create from Usage: Support "Create abstract function/property" inside an abstract class
#KT-7492 Fixed
(cherry picked from commit 75f6b7f)
2016-07-20 15:39:07 +03:00
Alexey Sedunov
3ba776fffa Code Insight: Format generated declarations
#KT-11176 Fixed
(cherry picked from commit 3641ad6)
2016-07-20 15:39:05 +03:00
Dmitry Jemerov
079d857aa2 update testdata for https://github.com/JetBrains/kotlin/pull/896/ 2016-07-19 17:58:09 +02:00
Alexey Sedunov
69704c017f Create from Usage: Suggest "Create function/secondary constructor" quick fix on argument type mismatch
#KT-11864 Fixed
(cherry picked from commit 1912783)
2016-06-28 15:07:12 +03:00
Pavel V. Talanov
a4c005fefd Update existing test data depending on diagnostic parameter rendering 2016-02-26 14:45:11 +03:00
Mikhail Glukhikh
eed4aa71db No assertion error in getContainingPseudocode #KT-10983 Fixed
Also #EA-72954 Fixed
2016-02-16 18:50:20 +03:00
Alexey Sedunov
ee9389d089 Create from Usage: Strip first parameter of extension function when expected type is non-extension 2015-12-25 18:50:19 +03:00
Pavel V. Talanov
a667aa2f71 Tests: add runtime (and runtime sources) to some tests that rely on being able to resolve references to built ins 2015-12-15 20:22:09 +03:00
Alexey Sedunov
f50059a11a Create from Usage: Implement "Create function" on callable references
#KT-10283 Fixed
2015-12-10 20:06:30 +03:00
Alexey Sedunov
44743aade5 Create from Usage: Allow type parameters in the receiver position
#KT-7497 Fixed
2015-12-10 20:06:26 +03:00
Alexey Sedunov
e517cbcf78 Quick Fixes: Implement "Rename unresolved reference" fix
#KT-8795 Fixed
2015-12-08 16:20:56 +03:00
Yan Zhulanow
1643441fdb Minor: fix quickfix tests (get/set functions are now created correctly, merge issue) 2015-11-27 20:30:19 +03:00
Yan Zhulanow
9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Yan Zhulanow
a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Alexey Sedunov
e37eea2b2d Create from Usage: Add infix modifier to functions generated from binary expressions
#KT-10184 Fixed
2015-11-26 21:22:20 +03:00
Alexey Sedunov
5b90c09ab1 Create from Usage: Add operator modifier to indexing get/set functions
#KT-10185 Fixed
2015-11-26 21:22:18 +03:00
Mikhail Glukhikh
4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Alexey Sedunov
aeee8bafe6 Name Suggester: Suggest parameter name for the corresponding argument expression
#KT-8111 Fixed
2015-11-16 11:29:59 +03:00
Nikolay Krasko
cde6388e26 getValue and setValue are now operators 2015-11-02 18:23:42 +03:00
Nikolay Krasko
911432c99c Use default render to check are all errors mentioned in tests. It's far more easier to read. 2015-10-28 13:39:46 +03:00