@Override
  public void checkAdd(@NotNull PsiElement element) throws IncorrectOperationException {
    if (element instanceof PsiClass) {
      if (((PsiClass)element).getContainingClass() == null) {
        JavaDirectoryServiceImpl.checkCreateClassOrInterface(this, ((PsiClass)element).getName());
      }
      else {
        LOG.error("not implemented");
      }
    }
    else {
      super.checkAdd(element);
    }
  }
@Override
  public void checkAdd(@NotNull PsiElement element)