GrCodeReferenceElement () { String baseClassName = getBaseClassName(); if (baseClassName == null) return null; GrCodeReferenceElement reference = dereference(myStubBaseReference); if (reference == null) { reference = GroovyPsiElementFactory.getInstance(getProject()).createCodeReference(baseClassName, getPsi()); myStubBaseReference = new SoftReference<>(reference); } return reference; }