Commit Graph

64 Commits

Author SHA1 Message Date
Valentin Kipyatkov f1fa33548a "Make types explicit in lambda" intention renamed to "Specify explicit lambda signature" 2015-05-02 14:03:21 +03:00
Alexey Sedunov d096e74c10 Move: Implement inspection which reports mismatch between package directive and containing directory 2015-05-01 18:58:09 +03:00
Alexey Sedunov 8879166f53 Move: Add intention to change file package without moving it physically 2015-05-01 17:16:57 +03:00
Valentin Kipyatkov a8d629f609 ConvertToForEachLoopIntention - renamed 2015-04-16 22:00:54 +03:00
Valentin Kipyatkov c2335790b5 ConvertToExpressionBodyIntention - refactoring 2015-04-16 22:00:53 +03:00
Valentin Kipyatkov b980d98af6 ConvertToBlockBodyAction - refactoring 2015-04-16 22:00:53 +03:00
Valentin Kipyatkov dc6c6f13d5 OperatorToFunctionIntention and SwapBinaryExpressionIntention: more narrow availability range + no i18n 2015-04-16 22:00:52 +03:00
Alexey Sedunov cef9996ba7 Intentions: Convert extension receiver to parameter and vice versa 2015-02-11 14:40:28 +03:00
Alexey Sedunov 03e076aba3 Intentions: function <-> property conversion 2015-02-05 23:12:38 +03:00
Zack Grannan b2858e5b82 Added ConvertToConcatenatedStringIntention 2014-05-23 16:27:46 +04:00
Zack Grannan 42f186b33f Added String Concat -> Interpolation Intention (KT-4750) 2014-05-16 19:00:25 +04:00
Jeremy Kaplan b3842285e8 Implemented Operator To Function intention action.
Converts +a, --a, a * b, a..b, a %= b, a in b, etc. to their function call counterparts.
2014-05-12 21:04:51 +04:00
Pradyoth Kukkapalli 5550924dc5 New Intention Action: Invert If Condition
Inverts the conditional expression in an if expression.
2014-05-12 19:48:43 +04:00
Pradyoth Kukkapalli 33fd82cf45 New Intention: Replace for loop with forEach
Replaces an expression of the form “for (i in list) { … }” with an
expression of the form “list.forEach { i -> … }”
2014-05-07 14:01:37 +04:00
Pradyoth Kukkapalli dbb28c571b New Intention Action: Replace a call to forEach function with for loop.
Replaces an expression of form x.forEach { … } with for (a in x) { … }.
2014-05-07 14:00:50 +04:00
Lingzhang 6066d19de5 Added KT-4579 makeTypeExplicitInLambda and makeTypeImplicitInLambda intentions 2014-04-24 18:11:43 +04:00
Tal Man f61db2decc Intention to transform an if an AssertionError throw into an assert 2014-04-24 15:36:34 +04:00
Zack Grannan aec5ae5dd4 Added IfThenToDoubleBangIntention 2014-04-22 22:33:08 +04:00
Zack Grannan 8476a790bd Added DoubleBangToIfThenIntention 2014-04-22 22:33:08 +04:00
Alexander Udalov 3b7c743acc Minor fix in assert<->if+throw intention description 2014-04-17 03:20:14 +04:00
Tal Man 9cff3ba049 Intention to convert assert to an if with throw 2014-04-15 19:26:39 -04:00
Tal Man b9e248b006 Intention for removing explicit type arguments at function calls 2014-04-14 11:14:09 -04:00
Tal Man cfc16b410e Intention for adding explicit type arguments at function calls 2014-04-10 16:28:42 +04:00
Tal Man 0feb0d35e6 Intention to simplify boolean expressions that have expressions in them that can be simplified to constants 2014-04-09 14:47:13 -04:00
Pradyoth Kukkapalli eb3ddf50bf New Intention Action: Replace with traditional assign.
This takes an expression of the form a += b and converts it to an
expression form a = a + b.
2014-04-07 09:43:02 -04:00
Pradyoth Kukkapalli 249af96d3c New Intention Action: Replace with operator assign
Replaces a statement of the form a = a + b with a statement of the form
a += b.
2014-04-07 09:43:01 -04:00
gavinkeusch a6a1bb2b7c KT-4574 New Intention: Split If - converts if statement containing one or more conjunction operators into two nested if statements 2014-03-31 14:40:00 +04:00
kuity 48b9dcf5ae Added KT-4549 SwapBinaryExpression Intention 2014-03-25 15:55:53 +04:00
Ross Hanson 55e888604e KT-4568: Created the ConvertNegatedExpressionWithDemorgansLaw intention. Converts an expression of the form !(a &&,|| b) to its expanded equivalent under DeMorgan's law. 2014-03-25 10:25:47 +04:00
Ross Hanson 2147a88ed8 KT-4568: Created the ConvertNegatedBooleanSequence intention. This intention takes an expression of the form !a &&,|| !b &&,|| ... and converts it to the DeMorgan equivalent !(a &&,|| b ...). 2014-03-25 10:25:47 +04:00
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