Commit Graph

13 Commits

Author SHA1 Message Date
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
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 f18b9cceb3 Implement 'not' postfix template
#KT-4710 In Progress
2016-09-20 15:26:39 +03:00