@Override
  public boolean processUsage(ChangeInfo changeInfo, UsageInfo usageInfo, boolean beforeMethodChange, UsageInfo[] usages) {
    PsiElement element = usageInfo.getElement();
    if (element == null) return false;
    if (!GroovyLanguage.INSTANCE.equals(element.getLanguage())) return false;

    JavaChangeInfo info = JavaChangeInfoConverters.getJavaChangeInfo(changeInfo, usageInfo);
    if (info == null) return false;


    if (beforeMethodChange) {
      if (usageInfo instanceof OverriderUsageInfo overriderUsageInfo) {
        PsiMethod method = overriderUsageInfo.getOverridingMethod();
        if (!(method instanceof GrMethod grMethod)) return true;
        processPrimaryMethodInner(info, grMethod, overriderUsageInfo.getBaseMethod());
      }
    }
    else {
      if (usageInfo instanceof GrMethodCallUsageInfo methodCallUsageInfo) {
        processMethodUsage(element, info, methodCallUsageInfo.isToChangeArguments(),
                           methodCallUsageInfo.isToCatchExceptions(),
                           methodCallUsageInfo.getMapToArguments(), methodCallUsageInfo.getSubstitutor());
        return true;
      }
      else if (usageInfo instanceof DefaultConstructorImplicitUsageInfo constructorImplicitUsageInfo) {
        processConstructor((GrMethod)constructorImplicitUsageInfo.getConstructor(), info);
        return true;
      }
      else if (usageInfo instanceof NoConstructorClassUsageInfo noConstructorClassUsageInfo) {
        processClassUsage((GrTypeDefinition)noConstructorClassUsageInfo.getPsiClass(), info);
        return true;
      }
      else if (usageInfo instanceof ChangeSignatureParameterUsageInfo changeSignatureParameterUsageInfo) {
        String newName = changeSignatureParameterUsageInfo.newParameterName;
        ((PsiReference)element).handleElementRename(newName);
        return true;
      }
      else {
        PsiReference ref = element.getReference();
        if (ref != null) {
          ref.bindToElement(info.getMethod());
          return true;
        }
      }
    }
    return false;
  }
@Override
  public boolean processUsage(ChangeInfo changeInfo, UsageInfo usageInfo, boolean beforeMethodChange, UsageInfo[] usages)