GrTypeElement () { String typeText = getTypeText(); if (typeText == null) return null; GrTypeElement typeElement = dereference(myTypeElement); if (typeElement == null) { typeElement = GroovyPsiElementFactory.getInstance(getProject()).createTypeElement(typeText, getPsi()); myTypeElement = new SoftReference<>(typeElement); } return typeElement; }