Commit Graph

119 Commits

Author SHA1 Message Date
Alexey Tsvetkov 8bc6ce0f0a Minor. Added object file template 2015-02-20 13:43:03 +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
Evgeny Gerashchenko b781a09caf Implemented simplest version of unused symbol inspection. 2015-01-14 15:48:45 +03:00
Alexander Udalov 17227bb4fe Rename org.jetbrains.kotlin.plugin -> org.jetbrains.kotlin.idea 2015-01-13 01:14:31 +03:00
Alexander Udalov 36a469ccd5 Rename jet -> kotlin in idea: JetBundle 2015-01-11 07:03:44 +03:00
Alexander Udalov 9f4513dd75 Rename jet -> kotlin in idea: icons 2015-01-11 05:09:03 +03:00
Evgeny Gerashchenko d29cc61d42 Fixed description for "Simplify Binary Negation" inspection. 2014-12-08 17:30:42 +03:00
Andrey Breslav 7f0df032b4 Highlight dynamic calls in the editor 2014-12-01 20:43:41 +03:00
Svetlana Isakova ce01c61811 Rename: auto cast -> smart cast 2014-10-01 18:52:52 +04: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
Tal Man 814b558bcf Inspection to report negated binary expressions that can be simplified 2014-05-08 19:02:58 +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
Natalia Ukhorskaya 020c127831 Fix typo in inspection description 2014-05-05 16:16:50 +04:00
Tal Man ab2ca539fe Inspection to report explicit type arguments that can be removed from function calls 2014-05-01 10:56:46 -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
Natalia Ukhorskaya ed7a156553 Merge remote-tracking branch 'origin/pr/435'
Conflicts:
	idea/src/META-INF/plugin.xml
	idea/tests/org/jetbrains/jet/plugin/codeInsight/JetInspectionTestGenerated.java
2014-04-11 12:11:44 +04:00
Zack Grannan 867925d5a1 Added ifThenToSafeAccessInspection 2014-04-10 15:44:59 -07:00
Zack Grannan 328607a3ab Added ifThenToElvisInspection
Conflicts:
	idea/src/META-INF/plugin.xml
2014-04-10 14:43:18 -07: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
Nikolay Krasko a39537f040 Update Kotlin icons 2014-03-31 14:09:49 +04:00
Alexey Sedunov 1bbec14cc0 Inspections: Explicit "get" 2014-03-25 16:49:43 +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
Svetlana Isakova b33e3fc9d6 Merge pull request #371 from Stebalien/push-not-in-intention
Add an intention to simplify negated expressions.
2014-03-20 11:15:36 +03:00
Nikolay Krasko 7b8e6fa462 Add kotlin templates for project create wizard
#KT-4689 Fixed
2014-03-19 21:08:29 +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