Commit Graph

217 Commits

Author SHA1 Message Date
Toshiaki Kameyama 1043284afe Add data modifier to a class quickfix #KT-18220 Fixed 2017-09-25 14:17:35 +03:00
Alexey Sedunov 97a3d343f7 Create Class from Usage: Support nested classes
This covers the case when original expression doesn't contains qualifier
Also for local or inner containing classes:
  - forbid nested objects
  - add 'inner' to nested class declaration

 #KT-16404 Fixed
2017-08-04 16:48:36 +03:00
Alexey Sedunov 78117b3e7b Create from Usage: Infer expected type from base declarations
#KT-17480 Fixed
2017-08-04 16:48:35 +03:00
Alexey Sedunov eda747c0bf Minor: Fix tests 2017-07-19 11:34:30 +03:00
Mikhail Glukhikh 43f9035d07 Minor test fix 2017-07-18 13:51:27 +03:00
Alexey Sedunov e98af7bfc1 Create Class from Usage: Use type parameter bounds as supertypes
#KT-15242 Fixed
2017-07-17 16:09:55 +03:00
Alexey Sedunov 95769dc9d3 Create from Usage: Make property lateinit where possible
#KT-17651 Fixed
2017-07-17 16:09:54 +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 0365d3a3d6 Create from Usage: Do not create type parameter by constuctor reference
#KT-17353 Fixed
2017-07-17 16:09:52 +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
Alexey Sedunov b48feb257c Create from Usage: Create data class property from destructuring entry
#KT-18540 Fixed
2017-07-17 16:09:48 +03:00
Mikhail Zarechenskiy ee173077c0 Simplify diagnostic when there are wrong number of type arguments
#KT-12767 Fixed
2017-07-12 14:37:27 +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
Dmitry Jemerov 558203e2bb Rename "Remove no constructor" to "Remove constructor call"; fix test 2017-06-07 19:49:45 +02:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 2017-05-26 13:58:46 +03:00
Dmitry Petrov 7979663e6c Update testData for changed diagnostic messages 2017-05-26 13:58:46 +03:00
Valentin Kipyatkov 1fe6886a33 Fixed error message to quote parameter name 2017-05-20 23:44:20 +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
Dmitry Jemerov e2f75463d7 Rewrite AbstractQuickFixTest based on light fixture test case
Don't reconfigure runtime before every test. For consistency,
mark tests that require the runtime with directives instead of relying
on test file names.
2017-03-27 19:48:43 +02:00
Vyacheslav Gerasimov 8c41e44b3b Fix MovePropertyToConstructorIntention and broken tests 2017-03-24 21:55:27 +03:00
Alexey Sedunov 834cdd63ab Create from Usage: Support class generation by class literal expression
#KT-16188 Fixed
2017-03-19 17:19:48 +03:00
Simon Ogorodnik 98269c10d8 KT-15744 Intention to import sleep wrongly suggests Thread.sleep
#KT-15744 fixed
2017-02-06 14:56:18 +03:00
Ilya Gorbunov b1b295f00f Fix variance of Map.minus in expected diagnostics output. 2017-01-26 07:27:00 +03:00
Ilya Gorbunov 384b6410f2 New minus overloads appears in quickfix test data 2017-01-25 22:08:48 +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 b6d4bb4921 Create from Usage: Support adding type parameters to the referenced type
#KT-11760 Fixed
2016-12-02 14:14:09 +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
Dmitry Petrov 9ac3dbceca Prohibit nested & local type aliases in 1.1: don't suggest to introduce typealias in a class or a function. 2016-11-21 10:25:51 +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
Mikhail Glukhikh e417a85276 Minor: secondary constructor to primary is suggested only on keyword and value parameter list
(cherry picked from commit 9a3e6d3)
2016-09-30 16:40:08 +03:00
Mikhail Glukhikh 725df49c8c KT-9839: intention introduced: convert secondary constructor to primary one #KT-9839 Fixed
(cherry picked from commit f3fa779)
2016-09-30 16:39:24 +03:00
Valentin Kipyatkov 21c2268f70 Protection against "<caret>" missing in test data
Many incorrect tests fixed
2016-09-27 18:05:26 +03:00
Valentin Kipyatkov e4f80e277f Better texts of change variable type quickfixes 2016-09-23 10:07:15 +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 63092f6985 Create from Usage: Implement "Create type parameter" quickfix
#KT-11525 Fixed
2016-08-29 16:20:32 +03:00
Alexey Sedunov 6a2edabbd4 Create from Usage: Implement "Create type alias" quickfix
#KT-12904 Fixed
2016-08-29 14:13:56 +03:00
Valentin Kipyatkov 17edbac72b Fixed test data 2016-08-29 13:38:18 +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
Alexey Sedunov 6e3d1d726e Create from Usage: Do not suggest creating annotations/enum classes for unresolved type parameter bounds
#KT-13364 Fixed
2016-08-10 11:45:37 +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