public static void saveOutlinerDocument(OutlinerDocument document) {
		FileProtocol protocol = Outliner.fileProtocolManager.getProtocol(PropertyContainerUtil.getPropertyAsString(document.getDocumentInfo(), DocumentInfo.KEY_PROTOCOL_NAME));
		
		// Get the default protocol if none was found.
		if (protocol == null) {
			protocol = Outliner.fileProtocolManager.getDefault();
		}
		
		if (!document.getFileName().equals("")) {
			FileMenu.saveFile(document.getFileName(), document,  protocol, false);
		} else {
			SaveAsFileMenuItem.saveAsOutlinerDocument(document, protocol);
		}
	}