Add intention for converting to block comment and vise versa

So #KT-23137 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-04-19 11:12:29 +03:00
committed by Mikhail Glukhikh
parent 3351b00870
commit e58d9c5507
45 changed files with 488 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.ConvertLineCommentToBlockCommentIntention
@@ -0,0 +1,4 @@
fun test() {
val foo = 1 // comment1<caret>
// comment2
}
@@ -0,0 +1,4 @@
fun test() {
val foo = 1 /* comment1 */
// comment2
}
@@ -0,0 +1,12 @@
fun test() {
// comment1
//
// comment2<caret>
//
// comment3
val foo = 1
}
@@ -0,0 +1,10 @@
fun test() {
/*
comment1
comment2
comment3
*/
val foo = 1
}
@@ -0,0 +1,7 @@
// IS_APPLICABLE: false
fun test() {
/*
comment
*/<caret>
val foo = 1
}
@@ -0,0 +1,5 @@
fun test(): Int {
// /* comment<caret>
val foo = 1
return foo
}
@@ -0,0 +1,5 @@
fun test(): Int {
/* / * comment */
val foo = 1
return foo
}
@@ -0,0 +1,5 @@
fun test2(): Int {
// comment */<caret>
val foo = 1
return foo
}
@@ -0,0 +1,5 @@
fun test2(): Int {
/* comment * / */
val foo = 1
return foo
}
@@ -0,0 +1,9 @@
fun foo() {}
// comment1
// comment2
// comment3<caret>
fun bar() {}
@@ -0,0 +1,11 @@
fun foo() {}
/*
comment1
comment2
comment3
*/
fun bar() {}
@@ -0,0 +1,6 @@
fun test() {
val foo = 1
// comment1<caret>
val bar = 1
}
@@ -0,0 +1,6 @@
fun test() {
val foo = 1
/* comment1 */
val bar = 1
}
@@ -0,0 +1,8 @@
fun test() {
val foo = 1
// comment1
// comment2<caret>
// comment3
val bar = 1
}
@@ -0,0 +1,10 @@
fun test() {
val foo = 1
/*
comment1
comment2
comment3
*/
val bar = 1
}