@Override
  public boolean canRepresent(final Object element) {
    VirtualFile file = getVirtualFile(element);
    if (file != null) {
      synchronized (chain) {
        if (chain.contains(file)) return true;
      }
    }
    if (super.canRepresent(element)) return true;
    PsiDirectory directory = getValue();
    Object owner = getParentValue();
    if (file == null || directory == null) return false;
    ProjectViewDirectoryHelper helper = ProjectViewDirectoryHelper.getInstance(directory.getProject());
    return helper.canRepresent(file, directory) ||
    owner instanceof PsiDirectory && helper.canRepresent(file, directory, (PsiDirectory)owner, getSettings());
  }
@Override
  public boolean canRepresent(final Object element)