Steven Allen
d198465522
Add an intention to simplify negated binary expressions
...
Given an expression of the form `!(a op b)`, replace it with `a !op b`.
For example:
!(a < b) -> a >= b
!(a is Int) -> a !is int
2014-03-19 12:10:28 -04:00
Zack Grannan
3862a3b5bc
Added ifThenToSafeAccessIntention
2014-03-12 16:02:56 +04:00
Zack Grannan
1f720c8559
Added safeAccessToIfThen intention
2014-03-12 16:02:55 +04:00
Zack Grannan
1ca4bb0e79
Added ifThenToElvisIntention
2014-03-12 16:02:55 +04:00
Zack Grannan
673369affe
Added elvisToIfThenIntention
2014-03-12 16:02:54 +04:00
Steven Allen
84a8911822
Add replacement intentions for operator functions
...
Add intentions for replacing attribute calls that correspond to
overloadable operators with their respective operators.
This commit includes call replacements for:
* Binary Infix Operators: plus, minus, times, rangeTo, mod, div
* Unary Prefix Operators: plus, minus, not
* Array Index Operator: get
* In Operator: contains
2014-03-10 11:15:11 -04:00
gavinkeusch
2f613638c2
KT-4562 New Intention: Add and Remove braces from control statements that have single line bodies
2014-03-06 23:45:45 +04:00
Tuomas Tynkkynen
8ce0d43118
Add intention for converting an implicit 'it' parameter to an explicitly named parameter
...
Kotlin's function literals have a shortcut for one-argument literals:
the single argument doesn't need to be explicitly named, but can be
referred via the 'it' contextual keyword. Add an intention action for
converting an implicit 'it' parameter to an explicitly named one.
For example, 'array(1, 2, 3).filter { it % 2 == 0 }'
-> 'array(1, 2, 3).filter { x -> x % 2 == 0 }'
2014-03-05 17:31:25 +04:00
Tuomas Tynkkynen
c6d6a32314
Add intention for replacing explicit function literal parameter with 'it'
...
Kotlin's function literals have a shortcut for one-argument literals:
the single argument doesn't need to be explicitly named, but can be
referred via the 'it' contextual keyword.
For example, 'array(1, 2, 3).filter { x -> x % 2 == 0 }'
-> 'array(1, 2, 3).filter { it % 2 == 0 }'
Add an intention action for this transformation.
2014-03-05 17:31:21 +04:00
Tal Man
8cf965db7e
2 intentions for moving lambda functions;
...
moves lambda functions in function calls inside and outside of the
parenthesis: foo({ it }) <-> foo() { it }
2014-03-04 20:07:42 +04:00
Valentin Kipyatkov
a2f6b99862
Convert to block body intention action
2014-03-04 19:13:54 +04:00
Tal Man
89779b5013
2 Intentions for string templates:
...
the first removes curly braces from a simple name variable, ${x} -> $x
and the second does the opposite $x -> ${x}
2014-02-24 21:20:40 +04:00
Pradyoth Kukkapalli
44234c7c0a
New Intention Action: Replace a dot-qualified function call with an infix function call.
2014-02-14 00:18:09 -05:00
Pradyoth Kukkapalli
8b6bd8a184
New Intention Action: Replace an infix function call with a dot qualified method call.
2014-02-09 09:05:19 -08:00
Valentin Kipyatkov
3e4b0d960a
Added missing intention description
2014-01-23 20:27:36 +04:00
Alexey Sedunov
9f5ee13c20
Implement "Merge when" intention
2013-11-20 20:55:58 +04:00
Alexey Sedunov
72f4ae3a13
Translate intention classes to Kotlin and apply refactoring
2013-11-18 18:33:34 +04:00
Andrey Breslav
8bf1ab85ab
Intention to replace a shorthand type with a reconstructed one
2013-09-13 22:41:06 +02:00
Andrey Breslav
c02f0a7d04
Intention to convert a member to an extension
2013-08-27 15:03:27 +04:00
Alexey Sedunov
3ab393e460
Implement split/join property declaration
2013-06-13 20:19:34 +04:00
Alexey Sedunov
3f2ff3eb24
Add code transformations for if/when in local property initializers
2013-06-07 17:05:05 +04:00
Alexey Sedunov
a1613d8b81
Implement 'when' transformations (flatten, introduce subject, eliminate subject)
2013-05-15 12:57:54 +04:00
Alexey Sedunov
3c691062ad
Implement if-to-when and when-to-if transformations
2013-05-15 12:57:53 +04:00
Alexey Sedunov
9ae17cfe85
Make intentions inner classes
2013-05-15 12:57:47 +04:00
Alexey Sedunov
64e578297c
Replace fold/unfold intentions with a set of specialized ones
2013-05-15 12:57:41 +04:00
Alexey Sedunov
9e441b0525
Fix intention descriptions and templates
2013-05-15 12:57:40 +04:00
Alexey Sedunov
02e9f174f0
Replace intentions for folding/unfolding operations
2013-05-15 12:57:29 +04:00
Wojciech Lopata
cd0e1b7508
RmoveUnnecessaryParenthesesIntention
2013-04-19 08:41:31 +02:00
Alexey Sedunov
1ed2d951fe
Fix syntax error in template
2013-04-09 13:15:48 +04:00
Alexey Sedunov
0b52696fe1
Fix intention description
2013-04-09 13:15:47 +04:00
Alexey Sedunov
9f828b8f41
Code transformation: if statement with assignments <-> assignment with if expression
2013-04-04 15:51:41 +04:00
Evgeny Gerashchenko
0f780a84d4
KT-2808 Intention to change existing alternative Kotlin signature
...
#KT-2808 fixed
2013-01-17 19:23:39 +04:00
Evgeny Gerashchenko
80f46af6ad
Added "Specify Kotlin Signature" intention.
2012-09-13 19:41:42 +04:00
Evgeny Gerashchenko
32605248c5
Added intention which adds or removes explicit type specification for property or variable.
...
#KT-1427 fixed
2012-04-21 01:09:05 +04:00