Commit Graph

123 Commits

Author SHA1 Message Date
Alexey Sedunov 8e2b0875c2 Intentions: Forbid conversion of vararg parameter to receiver 2015-02-20 19:08:17 +03:00
Alexey Sedunov cef9996ba7 Intentions: Convert extension receiver to parameter and vice versa 2015-02-11 14:40:28 +03:00
Valentin Kipyatkov 033b626a08 Fixed test data 2015-02-09 13:02:04 +03:00
Alexey Sedunov 03e076aba3 Intentions: function <-> property conversion 2015-02-05 23:12:38 +03:00
Alexander Udalov c82308d3be Rename jet -> kotlin in idea 2015-01-13 01:15:14 +03:00
Alexander Udalov fe544eaf71 Rename jet -> kotlin in idea: intentions
org.jetbrains.jet.plugin.intentions -> org.jetbrains.kotlin.idea.intentions
2015-01-13 01:14:37 +03:00
Alexey Sedunov 05a0481efa Formatter: Fix spacing between '=' and '{' in property accessors 2014-12-23 20:43:19 +03:00
Svetlana Isakova da8fdbd23e More tests for varargs updated 2014-12-12 23:08:28 +03:00
Denis Zharkov 654411a0b0 Refactored tests using Array constructor:
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00
Alexander Udalov a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Alexander Udalov 128c938965 Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00
Valentin Kipyatkov 11fd8fe392 Convert to expression body: fixed type selection for public override 2014-10-28 15:40:11 +03:00
Valentin Kipyatkov d13fd19a63 Added feature to "Convert to expression body" intention: selection for easier explicit type removal 2014-10-24 14:19:41 +04:00
Evgeny Gerashchenko fbcfed6757 Fixed EA-57220. 2014-10-15 11:51:01 +04:00
Andrey Breslav 0cbbb6a0db Test data fixed 2014-10-13 15:37:47 +04:00
Svetlana Isakova 2ae87cae4a Function literal expression outside the parentheses wrapped into JetFunctionLiteralArgument
Extracted JetFunctionLiteralArgument.moveInsideParenthesesAndReplaceWith util function
2014-07-30 17:14:00 +04:00
Zalim Bashorov c767ffc3e7 Unit.VALUE -> Unit in testData 2014-07-25 17:16:40 +04:00
Pavel V. Talanov 740fe70b22 Fix ConvertAssertToIfWithThrowIntention to avoid shortening more references than intended 2014-07-21 18:52:31 +04:00
Pavel V. Talanov f44ba60d51 Fix SimplifyBooleanWithConstantsIntention intention to avoid analyzing files created by JetPsiFactory 2014-07-21 18:52:30 +04:00
Pavel V. Talanov 1bc0a9dfd9 Fix InsertExplicitTypeArguments intention to insert imports for shortened types
#KT-5489 Fixed
2014-07-21 18:52:29 +04:00
Pavel V. Talanov 0462a018c5 Add test documenting a minor issue introduced in previous commit 2014-07-21 18:52:28 +04:00
Pavel V. Talanov 966da0b03f Fix ConvertAssertToIfWithThrowIntention
to not invoke ShortenReferences on file created by JetPsiFactory

 #KT-5476 Fixed
2014-07-21 18:52:27 +04:00
Pavel V. Talanov 1a5ba566cc Add test for the same pitfall for parameter types in MakeTypesExplicitInLambda 2014-07-21 18:52:26 +04:00
Pavel V. Talanov e390385bf9 Fix shortening references for return type in MakeTypeExplicitInLambdaIntention
#KT-5475 Fixed
2014-07-21 18:52:25 +04:00
Pavel V. Talanov 5246735648 Fix shortening references for receiver in MakeTypeExplicitInLambdaIntention
#KT-5474 Fixed
2014-07-21 18:52:24 +04:00
Evgeny Gerashchenko 0a3d852336 Minor. Renamed test data to avoid repetitions. 2014-07-10 15:05:18 +04:00
Evgeny Gerashchenko 55ed0471b6 KT-4980 'Remove braces' intention throws NPE for a for-loop with variable declaration
#KT-4980 fixed
2014-07-10 15:05:18 +04:00
Evgeny Gerashchenko 8842bb574c KT-5397 Simplify text of DeMorgan law conversion intentions
#KT-5397
2014-07-10 15:05:18 +04:00
Evgeny Gerashchenko fda7aeecfb Simplified CodeTransformationTest. Only one doTest method remains, intention class is moved to test data. Merged other intention tests (SpecifyTypeExplicitlyTest, ConvertToBlock/ExpressionBodyTest) into this one. 2014-07-10 15:05:17 +04:00
Evgeny Gerashchenko b1003fc034 Extracted test for "Join Lines" from CodeTransformationsTest. 2014-07-10 15:05:17 +04:00
Nikolay Krasko 0716b09920 Fix errors in intentions after parser fixes 2014-06-25 14:22:54 +04:00
Zalim Bashorov 247808e17b IDEA plugin: fixed crashing ifExpressionToElvis intention when applying to if expression which is part of another expression.
#EA-57307 fixed
2014-06-20 16:42:42 +04:00
Svetlana Isakova bc2d2fc2d4 KT-5099 "Remove explicit type arguments" should highlight only type arguments
#KT-5099 Fixed
2014-06-04 22:10:30 +04:00
Svetlana Isakova 1665ef7a00 KT-5028 "remove explicit type arguments" intention shouldn't be applicable
#KT-5028 Fixed
2014-06-04 22:10:29 +04:00
Svetlana Isakova beb7dc4524 Supported moving a labeled lambda outside parentheses 2014-05-29 17:18:47 +04:00
Svetlana Isakova 41df522234 Merge pull request #472 from wutalman/move_lambda
KT-4889: (Bug fix) Intention to move lambda outside parentheses now handles commas
2014-05-29 17:11:41 +04:00
Zack Grannan b2858e5b82 Added ConvertToConcatenatedStringIntention 2014-05-23 16:27:46 +04:00
Pavel V. Talanov 3334857870 Merge PR#471: Bug Fix: KT-4613 2014-05-22 15:24:22 +04:00
Andrey Breslav 3bd1329846 Fix file name case 2014-05-21 13:38:08 +04:00
Andrey Breslav 269e4ae828 SwapBinaryExpression: implementation cleaned up, tests renamed
#KT-4868 Fixed
2014-05-21 12:56:43 +04:00
Lingzhang acf1dc1912 KT-4868 Bug Fix for Swap Binary Expression Intention 2014-05-21 12:56:39 +04:00
Zack Grannan 42f186b33f Added String Concat -> Interpolation Intention (KT-4750) 2014-05-16 19:00:25 +04:00
Nikolay Krasko 3d588acd2d Add space between 'when' and '(' 2014-05-16 17:10:02 +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
Tal Man 9679e3ce4a insert type intention now only applicable in function names (KT-4950)
#KT-4950 Fixed
2014-05-08 14:11:21 +04:00
Tal Man 0032fb3575 Bug fix in intention to move lambda outside parentheses, handles commas better 2014-05-07 19:33:40 -04:00
Pradyoth Kukkapalli 65e670ef15 Bug Fix: KT-4613
Fix replace with infix function intention to be inapplicable in the
case of package function calls, such as “kotlin.io.println(“”).”
2014-05-07 15:25:39 -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