private void writeProfile(ResourceFile outputFile) {
		// write the pathnames
		try {
			BufferedWriter writer =
				new BufferedWriter(new OutputStreamWriter(outputFile.getOutputStream()));
			String[] paths = pathPanel.getPaths();
			for (String path : paths) {
				writer.write(path.trim());
				writer.newLine();
			}
			writer.newLine();
			// write the options
			String optStr = parseOptionsField.getText();
			StringTokenizer st = new StringTokenizer(optStr, "\n");
			while (st.hasMoreTokens()) {
				String tok = st.nextToken();
				writer.write(tok);
				writer.newLine();
			}
			writer.newLine();

			// Write paths
			String[] includePaths = includePathPanel.getPaths();
			for (String path : includePaths) {
				writer.write(path.trim());
				writer.newLine();
			}
			writer.newLine();

			// Write Language ID Spec
			if (languageIDString != null) {
				writer.write(languageIDString);
			}
			writer.newLine();
			writer.newLine();

			// Write Compiler ID Spec
			if (compilerIDString != null) {
				writer.write(compilerIDString);
			}
			writer.newLine();
			writer.newLine();

			writer.close();
		}
		catch (IOException e) {
			Msg.showError(this, getComponent(), "Error Writing Profile",
				"Writing profile " + outputFile.getName() + " failed", e);
		}
	}
Dialog that shows files used for parsing C header files. The profile has a list of source header
files to parse, followed by parse options (compiler directives). Ghidra supplies a Windows
profile by default in core/parserprofiles. The user can do "save as" on this default profile to
create new profiles that will be written to the user's {@code <home>/userprofiles} directory. The
CParserPlugin creates this directory if it doesn't exist.
<p>
The data types resulting from the parse operation can either be added to the data type manager in
the current program, or written to an archive data file.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/cparser/ParseDialog.java