Commit Graph

275 Commits

Author SHA1 Message Date
Alexey Sedunov 5bb035282f Generate 'toString()': Permit for data classes
#KT-14122 Fixed
2016-10-05 11:32:42 +03:00
Valentin Kipyatkov 75d56e4902 Better tooltip for try 2016-10-04 19:36:07 +03:00
Valentin Kipyatkov a2976ac281 Better presentation for property accessor 2016-10-04 19:36:07 +03:00
Dmitry Jemerov dbbba45d63 show type of control statements used as expressions 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 02a5856ffd don't show function literals and selectors of qualified expressions in "show expression type" 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 256fd04e95 show detailed smart cast info in "Show expression type" (KT-8803) 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 2141cd268c don't include properties with declared return type and property accessors in "show expression type" popup 2016-10-04 18:23:32 +02:00
Dmitry Jemerov e8fcd194f9 add test for obsolete KT-11601 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 4f1f313b36 don't show type of statements if they are not used as expressions 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 6dccfd3b22 use short names in Show Expression Type
#KT-11310 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov 4346afa19e test for handling smart casts in "show expression type"
#KT-10588 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov 032d50bbbf handle multi-declarations in "show expression type" 2016-10-04 18:23:32 +02:00
Dmitry Jemerov fbd2c48fbd don't offer functions with block body and functions with declared return type as candidates for "show expression type" 2016-10-04 18:23:32 +02:00
Dmitry Jemerov 7b644e2c52 support "show expression type" in variable declaration position
#KT-10095 Fixed
2016-10-04 18:23:32 +02: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
Denis Zharkov 0120085443 Refine expression kind definition in postfix templates
- Do not treat if without else as values
- Some statements aren't contained in block (see tests)

 #KT-14107 Fixed
 #KT-14110 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov 3c24996073 Refine default postfix templates selector
There is new settings checkCanBeUsedAsValue
Also expression filtering are split into to parts:
- getNonFilteredExpressions is trivially goes until it reaches
first block body of some declarations
- all additional filtering is merged into Condition that is passed into
PostfixTemplateExpressionSelectorBase super-call

Notable changes for users:
- do not suggest try for non-top-level expressions
- do not suggest var/par/etc for loops
2016-10-03 10:36:48 +03:00
Denis Zharkov ba2d2a036e Suggest postfix templates on lambda expressions 2016-10-03 10:36:48 +03:00
Denis Zharkov 54d9b4bee6 Do not suggest assignment as a subject in postfix templates
#KT-14077 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov 18146fafdf Allow if/when/try postfix templates in expression position
#KT-14078 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov bff9dd4ef5 Suggest assert/return postfix templates only for statements
#KT-14079 Fixed
 #KT-14090 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov ce128c5d6e Do not suggest operation references in postfix templates
#KT-14087 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov 23c0bdbd05 Add filtering of suggested expressions for postfix templates
Do not suggest qualified expression's selector or a part of user type
because they aren't really independent expressions
2016-09-22 18:11:22 +03:00
Nikolay Krasko 89a1389512 Make caret left move not-applicable on first function parameter 2016-09-20 15:27:01 +03:00
Denis Zharkov 189705727f Implement a bunch of string based postfix templates
#KT-4710 Fixed
2016-09-20 15:26:48 +03:00
Denis Zharkov 1b391123e6 Implement for/iter postfix templates
#KT-4710 In Progress
2016-09-20 15:26:47 +03:00
Denis Zharkov b702886f0d Introduce var/val postfix templates
#KT-4710 In Progress
2016-09-20 15:26:45 +03:00
Denis Zharkov 4d28199cc2 Implement if/else/null/notnull/when/try postfix templates
#KT-4710 In Progress
2016-09-20 15:26:42 +03:00
Denis Zharkov 09266b222b Implement 'Surround expression with if' surrounder
#KT-3363 Fixed
2016-09-20 15:26:41 +03:00
Denis Zharkov f18b9cceb3 Implement 'not' postfix template
#KT-4710 In Progress
2016-09-20 15:26:39 +03:00
Nikolay Krasko 3d0d82b862 Fix tests for move: check applicability from changed text
Presentation status has stopped working after https://github.com/JetBrains/intellij-community/commit/18ce2c6070667608d9bf5a18926778187564fd19
2016-09-20 15:26:36 +03:00
Valentin Kipyatkov fcce1e3838 KT-12852 Support breadcrumbs for Kotlin
#KT-12852 Fixed
2016-09-13 17:46:16 +03:00
Nikolay Krasko 52dd02fe08 Make changes in super call lambda not cause out-of-block modification (KT-13474)
#KT-13474 Fixed
2016-09-02 13:41:24 +03:00
Nikolay Krasko 64d511566e Test that out-of-block behaviour conforms running the analyze of the nearest expression
Mark as exceptions cases with field initialize expression and body of class init for now
2016-09-02 13:41:24 +03:00
Alexey Sedunov 89c39b9762 Misc: Use TODO() consistently in implementation stubs
#KT-13589 Fixed
2016-08-29 16:20:55 +03:00
Alexey Sedunov 238f99aa3d Override/Implement: Make return type non-nullable (platform collection case) when overriding Java method
#KT-13455 Fixed
2016-08-18 19:15:31 +03:00
Alexey Sedunov 1b546d18ff Override/Implement Members: Do not expand type aliases in the generated members. Retain abbreviated types during flexible type approximation
#KT-13244 Fixed
2016-08-10 11:45:36 +03:00
Alexey Sedunov 1a4ff598e3 Override/Implement Members: Do not make return type non-nullable if base
return type is explicitly nullable
 #KT-13383 Fixed
 #KT-13379 Fixed
2016-08-10 11:45:35 +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
Alexey Sedunov a33f946c14 Override/Implement Members: Implement Members: Fix base member detection when abstract and non-abstract members with matching signatures are inherited from an interface
#KT-11115 Fixed
(cherry picked from commit a3a2e57)
2016-07-20 15:39:01 +03:00
Dmitry Jemerov 079d857aa2 update testdata for https://github.com/JetBrains/kotlin/pull/896/ 2016-07-19 17:58:09 +02:00
Dmitry Jemerov e224041760 show line markers for properties defined in the primary constructor (KT-12626) 2016-07-14 23:32:07 +02:00
Nikolay Krasko eee45e91ce Add more tests for PropertyAccessorDescriptor.isDeafult() usages 2016-06-29 16:16:31 +03:00
Alexey Sedunov 81ec18e1fc Minor: Fix test data 2016-06-28 20:58:58 +03:00
Alexey Sedunov f9d28bf76d Override/Implement: Prefer not-nullable return type when overriding Java method without nullability annotation
#KT-12381 Fixed
(cherry picked from commit 2b87f8e)
2016-06-28 15:07:31 +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
Nikolay Krasko b107bc401c Formatter: Don't enforce empty line between secondary constructors without body (KT-12175)
#KT-12175 Fixed
2016-05-12 17:26:54 +03:00
Valentin Kipyatkov 07207949ba Support of KT-11255 Support Move Element Left/Right actions for Kotlin (except for enum entries)
#KT-11255 Fixed
2016-05-10 15:48:40 +03:00
Valentin Kipyatkov 06db49bab7 Restored lost tests 2016-05-10 15:41:33 +03:00
Denis Zharkov 5bc5722051 Load additional JDK functions into built-ins member scope
#KT-5990 Fixed
 #KT-7127 Fixed
 #KT-10370 Fixed
2016-04-25 17:41:08 +03:00