private static void invoke(@NotNull ActionContext context,
                             @NotNull PsiInstanceOfExpression instanceOfExpression,
                             @NotNull ModPsiUpdater updater) {
    PsiElement decl = createAndInsertCast(context.offset(), instanceOfExpression);
    if (decl == null) return;
    decl = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(decl);
    if (decl == null) return;
    decl = CodeStyleManager.getInstance(context.project()).reformat(decl);
    updater.moveCaretTo(decl.getTextRange().getEndOffset());
  }
private static void invoke(@NotNull ActionContext context,
                             @NotNull PsiInstanceOfExpression instanceOfExpression,
                             @NotNull ModPsiUpdater updater)