docs: void removeWindow(FileWindow w) {
          fileWindows.remove(w.getUrl());
          JMenu windowMenu = getWindowMenu();
          int count = windowMenu.getItemCount();
          JMenuItem lastItem = windowMenu.getItem(count -1);
          String name = getShortName(w.getUrl());
          for (int i = 5; i < count; i++) {
              JMenuItem item = windowMenu.getItem(i);
              if (item == null) continue; // separator
              String text = item.getText();
              //1 D:\foo.js
              //2 D:\bar.js
              int pos = text.indexOf(' ');
              if (text.substring(pos + 1).equals(name)) {
                  windowMenu.remove(item);
                  // Cascade    [0]
                  // Tile       [1]
                  // -------    [2]
                  // Console    [3]
                  // -------    [4]
                  if (count == 6) {
                      // remove the final separator
                      windowMenu.remove(4);
                  } else {
                      int j = i - 4;
                      for (;i < count -1; i++) {
                          JMenuItem thisItem = windowMenu.getItem(i);
                          if (thisItem != null) {
                              //1 D:\foo.js
                              //2 D:\bar.js
                              text = thisItem.getText();
                              if (text.equals("More Windows...")) {
                                  break;
                              }
                              pos = text.indexOf(' ');
                              thisItem.setText((char)('0' + j) + " " +
                                               text.substring(pos + 1));
                              thisItem.setMnemonic('0' + j);
                              j++;
                          }
                      }
                      if (count - 6 == 0 && lastItem != item) {
                          if (lastItem.getText().equals("More Windows...")) {
                              windowMenu.remove(lastItem);
                          }
                      }
                  }
                  break;
              }
          }
          windowMenu.revalidate();
      }