private static int getWeight(NodeDescriptor descriptor) {
    if (descriptor instanceof PsiDirectoryNode) {
      return ((PsiDirectoryNode)descriptor).isFQNameShown() ? 7 : 0;
    }
    else {
      return 2;
    }
  }
private static int getWeight(NodeDescriptor descriptor)