@Override
    protected Comparator<? super NodeDescriptor<?>> getFileComparator() {
      return (o1, o2) -> {
        if (o1 instanceof FileNodeDescriptor && o2 instanceof FileNodeDescriptor) {
          VirtualFile f1 = ((FileNodeDescriptor)o1).getElement().getFile();
          VirtualFile f2 = ((FileNodeDescriptor)o2).getElement().getFile();

          boolean isDir1 = f1.isDirectory();
          boolean isDir2 = f2.isDirectory();
          if (isDir1 != isDir2) return isDir1 ? -1 : 1;

          return f1.getPath().compareToIgnoreCase(f2.getPath());
        }
        return o1.getIndex() - o2.getIndex();
      };
    }
@Override
    protected Comparator<? super NodeDescriptor<?>> getFileComparator()