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
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
Tal Man
ab2ca539fe
Inspection to report explicit type arguments that can be removed from function calls
2014-05-01 10:56:46 -04:00
Ross Hanson
a5f7ac63a8
KT-4568: Cleaned up some of the code in ConvertNegatedBooleanSequence to match the other DeMorgan intention
2014-04-25 16:59:49 +04:00
Ross Hanson
4de6960443
KT-4568 Bug Fix: Refactored the convertNegatedExpressionWithDemorgansLaw intention to better handle longer and more complex expressions. Fixed bug and added appropriate test cases as well.
2014-04-25 16:59:49 +04:00
Lingzhang
6066d19de5
Added KT-4579 makeTypeExplicitInLambda and makeTypeImplicitInLambda intentions
2014-04-24 18:11:43 +04:00
Zalim Bashorov
525709bced
Added MIN_JAVA_VERSION directive for intentions and fixed failed test(convertIfToAssert/inapplicableCauseSent.kt).
2014-04-24 15:37:35 +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