public void setCompactedDirNode(final DirectoryNode compactedDirNode) {
   if (myCompactedDirNode != null) {
     myCompactedDirNode.myWrapper = null;
   }
   myCompactedDirNode = compactedDirNode;
   if (myCompactedDirNode != null) {
     myCompactedDirNode.myWrapper = this;
   }
 }
  public PsiDirectory getTargetDirectory() {
    DirectoryNode dirNode = this;
    DirectoryNode compacted;
    while ((compacted = dirNode.getCompactedDirNode()) != null) {
      dirNode = compacted;
    }

    return dirNode.getPsiDirectory();
  }
  public boolean equals(Object o) {
    if (isEquals()) {
      return super.equals(o);
    }
    if (this == o) return true;
    if (!(o instanceof DirectoryNode)) return false;

    final DirectoryNode packageNode = (DirectoryNode) o;

    if (!toString().equals(packageNode.toString())) return false;

    return true;
  }
 public String getDirName() {
   if (myVDirectory == null || !myVDirectory.isValid()) return "";
   if (myCompactPackages && myCompactedDirNode != null) {
     return myVDirectory.getName() + "/" + myCompactedDirNode.getDirName();
   }
   return myDirName;
 }
 public String toString() {
   if (myFQName != null) return myFQName;
   if (myCompactPackages && myCompactedDirNode != null) {
     return myDirName + "/" + myCompactedDirNode.getDirName();
   }
   return myDirName;
 }