Completely rewritten keyword completion implementation using another approach

#KT-2816 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-10-08 22:28:04 +04:00
parent 6a4fe52e51
commit 549171d043
41 changed files with 528 additions and 582 deletions
@@ -350,4 +350,10 @@ public fun PsiElement.parents(withItself: Boolean = true): Stream<PsiElement> {
public fun JetExpression.getAssignmentByLHS(): JetBinaryExpression? {
val parent = getParent() as? JetBinaryExpression ?: return null
return if (JetPsiUtil.isAssignment(parent) && parent.getLeft() == this) parent else null
}
}
public fun PsiElement.prevLeaf(skipEmptyElements: Boolean = false): PsiElement?
= PsiTreeUtil.prevLeaf(this, skipEmptyElements)
public fun PsiElement.nextLeaf(skipEmptyElements: Boolean = false): PsiElement?
= PsiTreeUtil.nextLeaf(this, skipEmptyElements)