Commit Graph

8 Commits

Author SHA1 Message Date
Toshiaki Kameyama d04f88ff66 Extract/Introduce variable: fix to work correctly if caret is before right parenthesis or comment
#KT-28607 Fixed
2019-11-12 12:03:16 +09:00
Alexey Sedunov 892c8436f3 Introduce Variable: Do not suggest expressions without type
#KT-12922 Fixed
2016-08-10 11:45:28 +03:00
Alexey Sedunov f87d2d1fcc Introduce Refactorings: Implement trimming renderer for expression
chooser. Do not suggest parenthesized expressions
 #KT-9028 Fixed
2015-12-10 20:07:26 +03:00
Denis Zharkov 44a55e5bf6 Adjust testData to new labels syntax 2015-04-29 14:03:11 +03:00
Alexey Sedunov 5f92c22df3 Smart Selector: Do not suggest expressions contained in the super-expression
#KT-4824 Fixed
2014-04-18 14:38:17 +04:00
Tuomas Tynkkynen 7a2321460d Prevent expression selector from selecting just a label
Previously, extract variable could act on e.g. 'break@outerLoop' and
extract the label, leading into nonsensical 'val x = @outerLoop'.
Prevent JetRefactoringUtil.selectExpression from returning label
expressions to fix this.

 #KT-4515 Fixed
2014-02-24 22:40:14 +04:00
Tuomas Tynkkynen 64f67f30f0 Prevent smartSelectExpression from breaking up 'this@outerClass'
The previous commit made JetThisExpression not implement
JetStatementExpression. This had the side effect that
smartSelectExpression over a label-qualified this expression
(e.g 'this@outerClass') would now also list a plain 'this'
as a potential expression. Restore the old behaviour by adding an
explicit check for JetThisExpression.
2014-02-09 17:22:30 +04:00
Tuomas Tynkkynen 85c46019d3 Add test suite for smart expression selector
Add test suite for smart expression selector (the small expression list
popup in e.g. Extract Variable.)

The test file format is similar to that in JetNameSuggesterTest: a .kt
file with the usual <caret> marker specifying the place where the smart
selector will be run. Then, the last comment in the file should contain
the expected outcome.
2014-02-09 17:22:24 +04:00