Commit Graph

127 Commits

Author SHA1 Message Date
Toshiaki Kameyama 343af60cb4 Add intention to expand boolean expression
#KT-38597 Fixed
2020-06-02 23:52:06 +03:00
Ilya Kirillov 0fe5694cb7 Do not render redundant Nullable annotations when generating declarations
#KT-36321 fixed
2020-02-11 13:48:58 +03:00
Toshiaki Kameyama 4d9b19da82 Remove comments from function/property implementation template
#KT-18539 Fixed
2019-11-13 08:37:25 +09:00
Yan Zhulanow d153aa87a8 Fix EA-126019: Handle 'null' PsiType as nullable Any in "Create" actions 2019-10-08 19:13:56 +09:00
Toshiaki Kameyama 44edd94fea "Create member function" quick fix: do not add redundant semicolons after enum entry
#KT-14899 Fixed
2019-09-24 19:40:31 +07:00
Igor Yakovlev 7b2f39530a Fix invalid testdata for ConvertToScopeIntention applicability 2019-08-28 16:31:49 +03:00
Mikhail Zarechenskiy d4d1648e1d [IDE-NI-MIGRATE] Migrate QuickFix tests for new inference 2019-05-06 13:59:24 +03:00
Toshiaki Kameyama 607325c6e5 Add "Round using roundToInt/roundToLong" quick fix
#KT-30389 Fixed
2019-04-11 18:58:05 +03:00
Dmitry Gridin c89d1af9fa Improve Create property from Usage
Place generated property next to other properties
 #KT-14886 Fixed
2019-02-27 00:07:55 +03:00
Mikhail Glukhikh c084eefb65 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
2019-02-25 10:37:46 +03:00
Mikhail Glukhikh 6e10235208 Make "Add name(s) to call arguments" available for generic arguments
#KT-15550 Fixed
2018-10-27 12:13:42 +03:00
Toshiaki Kameyama dc57887a4d Create function quick fix: fix visibility from inline method #KT-25228 Fixed 2018-09-04 19:01:22 +03:00
Vyacheslav Gerasimov a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Alexey Sedunov a5a13b74f5 Create from Usage: Support smart casts on explicit receivers
#KT-24069 Fixed
2018-05-11 16:05:20 +03:00
Alexey Sedunov a4a10c7ba4 Create from Usage: Fix generation of extensions with nullable receiver
#KT-23796 Fixed
2018-05-11 16:05:19 +03:00
Vyacheslav Gerasimov 8d3f71a04f 172: Revert "Quick Fixes: Support cross-language "Create from Usage" with Kotlin target"
This reverts commit 908bf71
2018-04-11 16:28:09 +03:00
Alexey Sedunov 96de29dfcb Create from Usage: Support accessors for local delegated properties
#KT-19730 Fixed
2018-03-06 15:15:40 +03:00
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