public void invoke(@NotNull Project project, PsiElement element, @Nullable Editor editor) {
    if (element instanceof PsiExpression) {
      invokeImpl(project, (PsiExpression)element, editor);
    }
    else if(element instanceof PsiLocalVariable) {
      invokeImpl(project, (PsiLocalVariable)element, editor);
    }
    else {
      LOG.error("elements[0] should be PsiExpression or PsiLocalVariable; was " + element);
    }
  }
public void invoke(@NotNull Project project, PsiElement element, @Nullable Editor editor)