@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) {
      PsiTypeCastExpression cast = PsiTreeUtil.getParentOfType(element, PsiTypeCastExpression.class);
      if (cast == null) return;
      PsiReferenceExpression ref = tryCast(PsiUtil.skipParenthesizedExprDown(cast.getOperand()), PsiReferenceExpression.class);
      if (ref == null) return;
      PsiVariable var = tryCast(ref.resolve(), PsiVariable.class);
      if (var == null) return;
      PsiTypeElement castType = cast.getCastType();
      if (castType == null) return;
      var.normalizeDeclaration();
      PsiTypeElement typeElement = var.getTypeElement();
      if (typeElement == null) return;
      PsiElement newTypeElement = JavaCodeStyleManager.getInstance(project).shortenClassReferences(typeElement.replace(castType));
      for (PsiReferenceExpression varRef : VariableAccessUtils.getVariableReferences(var)) {
        if (PsiUtil.skipParenthesizedExprUp(varRef.getParent()) instanceof PsiTypeCastExpression castOccurrence && 
            RedundantCastUtil.isCastRedundant(castOccurrence)) {
          RemoveRedundantCastUtil.removeCast(castOccurrence);
        }
      }
      if (myOnTheFly) {
        updater.highlight(newTypeElement, EditorColors.SEARCH_RESULT_ATTRIBUTES);
      }
    }
@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater)