/**
   * Saves all outliner documents that are currently modified and are not imported. We don't want to
   * save imported docs since they won't have a valid current save format, i.e. they're imported.
   */
  protected static void saveAllOutlinerDocuments() {
    for (int i = 0; i < Outliner.documents.openDocumentCount(); i++) {
      OutlinerDocument doc = (OutlinerDocument) Outliner.documents.getDocument(i);

      if (doc.isModified()
          && !PropertyContainerUtil.getPropertyAsBoolean(
              doc.getDocumentInfo(), DocumentInfo.KEY_IMPORTED)) {
        SaveFileMenuItem.saveOutlinerDocument(doc);
      }
    }
  }
  private void calculateEnabledState() {
    for (int i = 0, limit = Outliner.documents.openDocumentCount(); i < limit; i++) {
      Document doc = Outliner.documents.getDocument(i);

      if ((doc.isModified() || doc.getFileName().equals(""))
          && !PropertyContainerUtil.getPropertyAsBoolean(
              doc.getDocumentInfo(), DocumentInfo.KEY_IMPORTED)) {
        setEnabled(true);
        return;
      }
    }

    setEnabled(false);
  }