void (final TreeElement element, final ASTNode original, final Map<Object, Object> encodingState) { if (original instanceof CompositeElement && !isInsideImport(original)) { IElementType elementType = original.getElementType(); if (elementType == GroovyElementTypes.REFERENCE_ELEMENT || elementType == GroovyElementTypes.REFERENCE_EXPRESSION) { PsiElement psi = original.getPsi(); Project project = psi.getProject(); if (!PsiUtil.isThisOrSuperRef(psi) && project.isInitialized() && !DumbService.isDumb(project)) { final GroovyResolveResult result = ((GrReferenceElement<?>)psi).advancedResolve(); final PsiElement target = result.getElement(); if (target instanceof PsiClass || (target instanceof PsiMethod || target instanceof PsiField) && ((PsiMember)target).hasModifierProperty(PsiModifier.STATIC) && result.getCurrentFileResolveContext() instanceof GrImportStatement) { element.putCopyableUserData(REFERENCED_MEMBER_KEY, (PsiMember)target); } } } } }