private static boolean isDumbEnough(@NotNull PostfixTemplate template, @NotNull PsiElement context) {
    DumbService dumbService = DumbService.getInstance(context.getProject());
    return dumbService.isUsableInCurrentContext(template);
  }
private static boolean isDumbEnough(@NotNull PostfixTemplate template, @NotNull PsiElement context)