Commit Graph

890 Commits

Author SHA1 Message Date
Nikolay Krasko 2bb48fc802 Allow empty single-line bodies in property accessors 2016-12-14 13:40:44 +03:00
Nikolay Krasko 2841931ffa Do not force new line in body for empty functions and function expressions (KT-10828)
#KT-10828 Fixed
2016-12-14 13:35:31 +03:00
Dmitry Jemerov b8dc1b6771 Allow regex matching of available action names; accept both 2016.2 and 2016.3 names of static import quickfix 2016-12-13 12:40:03 +01:00
Mikhail Zarechenskiy 40ff7c6e33 Fix test data 2016-12-09 21:08:29 +03:00
Mikhail Zarechenskiy 373c1be7e4 Add quick fixes for mod/rem migration
- Remove 'operator' modifier
 - Rename operator 'mod/modAssign' to 'rem/remAssign'
2016-12-09 17:01:42 +03:00
Mikhael Bogdanov 5ffc0b36b0 Quickfix for published api 2016-12-09 11:55:16 +01:00
Mikhail Glukhikh 268702e0cc "Change return type for enclosing fix" now handles TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH correctly #KT-14063 Fixed 2016-12-07 18:52:04 +03:00
Mikhail Glukhikh 2ac8e5b4a7 "Change return type fix" now handles data class properties correctly #KT-15028 Fixed 2016-12-07 18:51:58 +03:00
Mikhail Glukhikh 299f477a1b Call method references search in UnusedSymbolInspection.hasReferences to fix secondary constructor search
Makes #KT-12500 Fixed
Makes #KT-12501 Fixed
2016-12-05 10:58:21 +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 c773afdbfa Intentions: Implement "Add names to call arguments" intention
#KT-14729 Fixed
2016-12-02 14:14:08 +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
Nikolay Krasko 6a9c368532 Auto-import does not suggest enum constant (KT-14100)
#KT-14100 Fixed

(cherry picked from commit 61730ee)
2016-12-01 14:33:37 +03:00
Alexey Sedunov 465138cfa1 Initialize with Constructor Parameter Intention: Fix IDE freeze on properties in generic class
#KT-14459 Fixed
2016-11-30 14:35:38 +03:00
Mikhail Glukhikh 904ea33291 KT-12633 related test fix 2016-11-28 17:32:01 +03:00
Mikhail Glukhikh b111d1ba69 Convert reference to lambda intention introduced #KT-13393 Fixed 2016-11-24 15:26:18 +03:00
Mikhail Glukhikh c6997a1213 Redundant if inspection supports now assignments and just if (...) true else false #KT-13259 Fixed 2016-11-24 15:25:56 +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
Dmitry Jemerov 140c7351a8 Add quickfix for incorrect @JvmOverloads annotation
#KT-12701 Fixed
2016-11-18 11:05:00 +01:00
Denis Zharkov b5a6cbd188 Adjust "Remove explicit type" intention to properties with getters
#KT-14794 Fixed
2016-11-15 09:30:13 +03:00
Denis Zharkov 6fca46a452 Allow inferring property type from its getter
#KT-550 Fixed
2016-11-15 09:30:13 +03:00
Valentin Kipyatkov 330d3a255a introduceValue() always adds statement before except for safe call case 2016-11-08 12:46:42 +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
Denis Zharkov 8aefc0db7c Do not suggest "Rename to _" quick-fix for parameter of named function
#KT-14586 Fixed
2016-11-02 15:38:03 +03:00
Kirill Rakhman e10d10c49e Add quick fix to remove single lambda parameter if it's unused #KT-14593 Fixed 2016-11-01 14:11:02 +03:00
shiraji e7575599eb Correct handling of "Redundant if" for negation case #KT-14575 Fixed 2016-10-31 12:35:00 +03:00
Mikhail Glukhikh fd9e59ac7b Surround with null check for unsafe things: find first parent statement to surround (which is not used as expression) #KT-13958 Fixed 2016-10-25 17:57:32 +03:00
Mikhail Glukhikh e53940f4af KT-8442 related: correct handling of erroneous destructuring references, fixes EA-90434 2016-10-25 13:13:15 +03:00
Denis Zharkov 7d89869c02 Do not suggest "Remove parameter" quick-fix on lambdas
Only "Rename to _" should work in the case.

The problem is that removing lambda's parameter may lead behaviour changes.
This quick-fix was not being invoked run before KT-14347 had been implemented

# Conflicts:
#	idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java
2016-10-24 10:19:25 +03:00
Denis Zharkov 5e1b219784 Implement quick-fix replacing parameter name with _
This quick-fix is registered for UNUSED_* diagnostic in places
where it can be applied (destructured declarations/lambda parameters)

 #KT-14431 Fixed
2016-10-24 10:19:25 +03:00
Kirill Rakhman 09d6e2e0c0 Add quick-fixes for lateinit-related errors #KT-14342 Fixed 2016-10-14 16:14:00 +03:00
Alexey Sedunov 2187a77646 Intentions: Implement "Convert enum to sealed class" intention
#KT-14245 In Progress
2016-10-13 19:00:56 +03:00
Denis Zharkov 05aa9a5682 Add a quickfix for warning on ambiguously annotated expression
#KT-14238 Fixed
2016-10-12 11:40:16 +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
Valentin Kipyatkov 73dc5fefcb KT-12077 Code completion inserts FQN for annotations with use-site target inside primary constructor
KT-13009 Kotlin: annotation auto-import is broken in multiple ways

  #KT-12077 Fixed
  #KT-13009 Fixed
2016-10-11 17:26:52 +03:00
Mikhail Glukhikh 0903402282 "If null to elvis" now converts to elvis also !is check right after initializer #KT-14032 Fixed 2016-10-11 16:13:11 +03:00
Valentin Kipyatkov 5734f2ba9b KT-9950 IntelliJ IDEA does not suggest importing extension methods which have the same name as an instance method
#KT-9950 Fixed
2016-10-10 14:48:15 +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 3163d28b29 Minor: test fixed 2016-10-06 21:02:53 +03:00
Alexey Sedunov 0616e869aa Quick Fixes: Implement "Remove unused assignment" quickfix
#KT-9931 Fixed
2016-10-05 11:32:41 +03:00
Denis Zharkov 4910024cdb Fix suppress at statement intention for asigmnents
There's no need now to consider precedence of element as
annotation preceding the beginning of block statement
is always now attached to the whole statement

 #KT-11673 Fixed
 #KT-12780 Fixed
2016-10-05 10:29:29 +03:00
Dmitry Petrov 06101dba52 KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.

Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).

Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +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
Mikhail Glukhikh 7f50e6e70e KT-9839: intention introduced: convert primary constructor to secondary one
(cherry picked from commit 93aaa48)
2016-09-30 16:39:01 +03:00
Simon Ogorodnik 18feb8f622 Return Kotlin fields and methods through KotlinShortNameCache
#KT-12205 Fixed
2016-09-28 13:36:20 +02:00
Mikhail Glukhikh 67cc83af05 Quick-fix for UNNECESSARY_LATEINIT
(cherry picked from commit 77f7bb0)
2016-09-27 18:49:13 +03:00
Valentin Kipyatkov 21c2268f70 Protection against "<caret>" missing in test data
Many incorrect tests fixed
2016-09-27 18:05:26 +03:00