private void handleFileClick(FindReplaceResult result) {
		try {
			String filepath = result.getFile().getCanonicalPath();
			Document doc = Outliner.documents.getDocument(filepath);
			
			if (doc == null) {
				// grab the file's extension
				String extension = filepath.substring(filepath.lastIndexOf(".") + 1, filepath.length());
				
				// use the extension to figure out the file's format
				String fileFormat = Outliner.fileFormatManager.getOpenFileFormatNameForExtension(extension);
				
				// crank up a fresh docInfo struct
				DocumentInfo docInfo = new DocumentInfo();
				PropertyContainerUtil.setPropertyAsString(docInfo, DocumentInfo.KEY_PATH, filepath);
				PropertyContainerUtil.setPropertyAsString(docInfo, DocumentInfo.KEY_ENCODING_TYPE, Preferences.getPreferenceString(Preferences.OPEN_ENCODING).cur);
				PropertyContainerUtil.setPropertyAsString(docInfo, DocumentInfo.KEY_FILE_FORMAT, fileFormat);
				
				// try to open up the file
				FileMenu.openFile(docInfo, Outliner.fileProtocolManager.getDefault());
				
				doc = Outliner.documents.getDocument(filepath);
				
				if (doc == null) {
					// Something went wrong opening the file so abort.
					return;
				}
			}
			result.setDocument((OutlinerDocument) doc);
			
			// Handle like an open document now
			handleDocumentClick(result, FILE_MODE);
		} catch (IOException e) {
			System.out.println("IOException while handling click to open file: " + e.getMessage());
		}
	}