public boolean canRepresent(Object element, PsiDirectory directory) {
    if (element instanceof VirtualFile vFile) {
      return Comparing.equal(directory.getVirtualFile(), vFile);
    }
    return false;
  }
public boolean canRepresent(Object element, PsiDirectory directory)