public void configureForSave(OutlinerDocument doc, String protocolName, String currentDirectory) {
		lazyInstantiate();
		
		// adjust title
		setDialogTitle("Save: " + protocolName);
		
		// adjust approve button
		setApproveButtonToolTipText("Save file as named");
		
		// Set the Accessory state
		setAccessory(saveAccessory);
		
		// Set the Accessory GUI state.
		saveLineEndComboBox.setSelectedItem(doc.settings.getLineEnd().cur);
		saveEncodingComboBox.setSelectedItem(doc.settings.getSaveEncoding().cur);
		saveFormatComboBox.setSelectedItem(doc.settings.getSaveFormat().cur);
		
		// Set the current directory location or selected file.
		// grab the file's name
		String currentFileName = doc.getFileName();
		
		// if it's an imported file ...
		if (PropertyContainerUtil.getPropertyAsBoolean(doc.getDocumentInfo(), DocumentInfo.KEY_IMPORTED)) {
			// trim any extension off the file name
			String trimmedFileName = StanStringTools.trimFileExtension(currentFileName);
			
			// obtain the current default save format's extension
			String extension = 	(Outliner.fileFormatManager.getSaveFormat(doc.settings.getSaveFormat().cur)).getDefaultExtension();
			
			// addemup
			setSelectedFile(new File(trimmedFileName + "." + extension));
		
		} else {
			if (!currentFileName.equals("")) {
				
				// set up using the filename
				setSelectedFile(new File(currentFileName));
				
			} else {
				// use the current directory
				setCurrentDirectory(new File(currentDirectory));
				
				// start with the window title
				String title = doc.getTitle();
				
				// obtain the current default save format's extension
				String extension = 	(Outliner.fileFormatManager.getSaveFormat(doc.settings.getSaveFormat().cur)).getDefaultExtension();
			
				// addemup
				setSelectedFile(new File(title + "." + extension));
			}
		}
		
		this.dialogType = JFileChooser.SAVE_DIALOG;
	}