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
@@ -153,6 +153,10 @@ fun PsiElement.getPrevSiblingIgnoringWhitespaceAndComments(withItself: Boolean =
return siblings(withItself = withItself, forward = false).filter { it !is PsiWhiteSpace && it !is PsiComment }.firstOrNull()
}
fun PsiElement.getPrevSiblingIgnoringWhitespace(withItself: Boolean = false): PsiElement? {
return siblings(withItself = withItself, forward = false).filter { it !is PsiWhiteSpace }.firstOrNull()
}
inline fun <reified T : PsiElement> T.nextSiblingOfSameType() = PsiTreeUtil.getNextSiblingOfType(this, T::class.java)
inline fun <reified T : PsiElement> T.prevSiblingOfSameType() = PsiTreeUtil.getPrevSiblingOfType(this, T::class.java)