@Override
  public void setVariables(@NotNull Template template, @NotNull PsiElement element) {
    super.setVariables(template, element);
    if (element instanceof PsiExpression expression) {
      Project project = element.getProject();
      PsiType[] types = DumbService.getInstance(project).computeWithAlternativeResolveEnabled(
        () -> GuessManager.getInstance(project).guessTypeToCast(expression));
      fill(template, types, element);
    }
    else {
      template.addVariable(TYPE_VAR, null, null, true, false);
    }

    MacroCallNode nameMacro = new MacroCallNode(new SuggestVariableNameMacro());
    template.addVariable(VAR_NAME, nameMacro, nameMacro, true);
  }
@Override
  public void setVariables(@NotNull Template template, @NotNull PsiElement element)