@Override
  protected @NotNull ModCommand perform(@NotNull ActionContext context, @NotNull PsiVariable variable) {
    final List<PsiReferenceExpression> references = collectReferences(variable);
    Map<PsiExpression, List<PsiExpression>> effects = collectSideEffects(variable, references);
    if (effects.isEmpty()) {
      return new RemoveVariableSideEffectAware(variable, false).perform(context);
    }
    else {
      return ModCommand.chooseAction(JavaBundle.message("popup.title.remove.unused.variable"),
                                     new RemoveVariableSideEffectAware(variable, true),
                                     new RemoveVariableSideEffectAware(variable, false));
    }
  }
@Override
  protected @NotNull ModCommand perform(@NotNull ActionContext context, @NotNull PsiVariable variable)