@Override
  public boolean accepts(PsiElement element) {
    if (element instanceof PsiComment && element.getParent() instanceof PsiCodeBlock) {
      // only allow comments in statement context
      return true;
    }
    return element instanceof PsiStatement;
  }
@Override
  public boolean accepts(PsiElement element)