Completion of keywords (like constructor) doesn't insert parentheses/braces if they're already there
#KT-15603 Fixed #KT-13524 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
56d3f90a02
commit
d44bf27ec3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -145,6 +145,10 @@ fun PsiElement.getNextSiblingIgnoringWhitespaceAndComments(withItself: Boolean =
|
||||
return siblings(withItself = withItself).filter { it !is PsiWhiteSpace && it !is PsiComment }.firstOrNull()
|
||||
}
|
||||
|
||||
fun PsiElement.getNextSiblingIgnoringWhitespace(withItself: Boolean = false): PsiElement? {
|
||||
return siblings(withItself = withItself).filter { it !is PsiWhiteSpace }.firstOrNull()
|
||||
}
|
||||
|
||||
fun PsiElement.getPrevSiblingIgnoringWhitespaceAndComments(withItself: Boolean = false): PsiElement? {
|
||||
return siblings(withItself = withItself, forward = false).filter { it !is PsiWhiteSpace && it !is PsiComment }.firstOrNull()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user