private static boolean isAccessedForWriting(PsiElement referenceElement) {
    if (referenceElement.getLanguage() == JavaLanguage.INSTANCE) {
      if (!(referenceElement instanceof PsiExpression) || PsiUtil.isAccessedForWriting((PsiExpression)referenceElement)) {
        return true;
      }
    }
    else {
      for (ReadWriteAccessDetector detector : ReadWriteAccessDetector.EP_NAME.getExtensionList()) {
        if (detector.getExpressionAccess(referenceElement) != ReadWriteAccessDetector.Access.Read) {
          return true;
        }
      }
    }
    return false;
  }
private static boolean isAccessedForWriting(PsiElement referenceElement)