VERY rough implementation of annotations with parameters in ReplaceWIth pattern

This commit is contained in:
Valentin Kipyatkov
2015-10-09 22:24:14 +03:00
parent c8c3e88c82
commit 4290601807
11 changed files with 186 additions and 54 deletions
@@ -78,7 +78,11 @@ public class JetPsiFactory(private val project: Project) {
}
public fun createType(type: String): JetTypeReference {
return createProperty("val x : $type").getTypeReference()!!
val typeReference = createProperty("val x : $type").typeReference
if (typeReference == null || typeReference.text != type) {
throw IllegalArgumentException("Incorrect type: $type")
}
return typeReference
}
public fun createStar(): PsiElement {