Fix SimplifyBooleanWithConstantsIntention intention to avoid analyzing files created by JetPsiFactory

This commit is contained in:
Pavel V. Talanov
2014-07-20 19:09:34 +04:00
parent 1bc0a9dfd9
commit f44ba60d51
5 changed files with 39 additions and 17 deletions
@@ -96,6 +96,9 @@ public fun JetClass.isAbstract(): Boolean = isTrait() || hasModifier(JetTokens.A
[suppress("UNCHECKED_CAST")]
public fun <T: PsiElement> PsiElement.replaced(newElement: T): T = replace(newElement) as T
[suppress("UNCHECKED_CAST")]
public fun <T: PsiElement> T.copied(): T = copy() as T
public fun JetElement.blockExpressionsOrSingle(): Stream<JetElement> =
if (this is JetBlockExpression) getStatements().stream() else listOf(this).stream()