[groovy] make GroovyDummyElement accept non null text; fix a typo

(IDEA-CR-32925)
This commit is contained in:
Daniil Ovchinnikov
2018-05-24 01:51:23 +03:00
parent 8bf85bb2f4
commit 9e50dfae2f
2 changed files with 2 additions and 2 deletions
@@ -4,4 +4,4 @@ package org.jetbrains.plugins.groovy.lang.psi.impl
import com.intellij.psi.impl.source.tree.FileElement
import com.intellij.psi.tree.IElementType
class GroovyDummyElement(val childType: IElementType, text: CharSequence?) : FileElement(GroovyDummyElementType, text)
class GroovyDummyElement(val childType: IElementType, text: CharSequence) : FileElement(GroovyDummyElementType, text)
@@ -123,7 +123,7 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory {
DummyHolder holder = new DummyHolder(myManager, dummyElement, context);
PsiElement element = holder.getFirstChild();
if (!(element instanceof GrCodeReferenceElement)) {
throw new IncorrectOperationException("Incorrect core reference '" + refName + "'");
throw new IncorrectOperationException("Incorrect code reference '" + refName + "'");
}
return (GrCodeReferenceElement)element;
}