@Override
    @NotNull
    public String getPresentableGroupText() {

      if (compactMiddleDirectories) {
        List<String> parentPathList = CompactGroupHelper.pathToPathList(myDir.getPath());
        List<String> relativePathList = CompactGroupHelper.pathToPathList(relativePathText);
        String rel = relativePathText.startsWith("/") ? relativePathText.substring(1) : relativePathText;

        if (parentPathList.size() == relativePathList.size()) {
          VirtualFile baseDir = ProjectUtil.guessProjectDir(myProject);
          String relativePath = null;
          if (baseDir != null && baseDir.getParent() != null) {
            relativePath = VfsUtilCore.getRelativePath(myDir, baseDir.getParent(), File.separatorChar);
          }
          return relativePath == null ?
                 rel : relativePath.replace("\\", "/");
        }
        return rel;
      }
      else {
        if (myFlattenDirs || myDir.getParent() == null) {
          VirtualFile baseDir = ProjectUtil.guessProjectDir(myProject);
          String relativePath = baseDir == null ? null : VfsUtilCore.getRelativePath(myDir, baseDir, File.separatorChar);
          return relativePath == null ? myDir.getPresentableUrl() : relativePath;
        }
      }
      return myDir.getName();
    }
@Override
    @NotNull
    public String getPresentableGroupText()