Add intention to add/remove underscores in numeric literal

#KT-28953 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-01-07 07:10:27 +09:00
committed by Mikhail Glukhikh
parent 225a6ea288
commit 622fd8d8cf
27 changed files with 189 additions and 0 deletions
+10
View File
@@ -1689,6 +1689,16 @@
<category>Kotlin</category>
</intentionAction>
<intentionAction>
<className>org.jetbrains.kotlin.idea.intentions.AddUnderscoresToNumericLiteralIntention</className>
<category>Kotlin</category>
</intentionAction>
<intentionAction>
<className>org.jetbrains.kotlin.idea.intentions.RemoveUnderscoresFromNumericLiteralIntention</className>
<category>Kotlin</category>
</intentionAction>
<lang.inspectionSuppressor language="kotlin" implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinInspectionSuppressor"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.ObjectLiteralToLambdaInspection"
@@ -0,0 +1 @@
val oneMillion = <spot>1_000_000</spot>
@@ -0,0 +1 @@
val oneMillion = <spot>1000000</spot>
@@ -0,0 +1,5 @@
<html>
<body>
This intention adds underscores to a numeric literal.
</body>
</html>
@@ -0,0 +1 @@
val oneMillion = <spot>1000000</spot>
@@ -0,0 +1 @@
val oneMillion = <spot>1_000_000</spot>
@@ -0,0 +1,5 @@
<html>
<body>
This intention removes underscores from a numeric literal.
</body>
</html>