private void loadProfile() {
		if (docListener != null) {
			parseOptionsField.getDocument().removeDocumentListener(docListener);
		}
		tableModel.removeTableModelListener(tableListener);
		parsePathTableModel.removeTableModelListener(parsePathTableListener);
		ComboBoxItem item = (ComboBoxItem) comboBox.getSelectedItem();
		item.isChanged = false;

		StringBuffer sb = new StringBuffer();
		List<String> pathList = new ArrayList<>();
		List<String> includeList = new ArrayList<>();
		String langString = null;
		String compileString = null;
		try {
			BufferedReader br =
				new BufferedReader(new InputStreamReader(item.file.getInputStream()));
			String line = null;
			while ((line = br.readLine()) != null && line.trim().length() > 0) {
				line = line.trim();

				pathList.add(line);
			}

			while ((line = br.readLine()) != null && line.trim().length() > 0) {
				line = line.trim();

				sb.append(line + "\n");
			}

			// get paths
			while ((line = br.readLine()) != null && line.trim().length() > 0) {
				line = line.trim();

				includeList.add(line);
			}

			// get language
			while ((line = br.readLine()) != null) {
				line = line.trim();
				if (line.length() > 0) {
					langString = (line.length() == 0 ? null : line);
					break;
				}
			}

			// get compiler spec
			while ((line = br.readLine()) != null) {
				line = line.trim();
				if (line.length() > 0) {
					compileString = (line.length() == 0 ? null : line);
					break;
				}
			}

			String[] paths = new String[pathList.size()];
			paths = pathList.toArray(paths);
			pathPanel.setPaths(paths);

			String[] incpaths = new String[includeList.size()];
			incpaths = includeList.toArray(incpaths);
			includePathPanel.setPaths(incpaths);

			parseOptionsField.setText(sb.toString());

			languageIDString = langString;

			compilerIDString = compileString;

			updateArchitectureDescription();

			br.close();
		}
		catch (FileNotFoundException e) {
			Msg.showInfo(getClass(), getComponent(), "File Not Found",
				"Could not find file\n" + item.file.getAbsolutePath());
		}
		catch (IOException e) {
			Msg.showError(this, getComponent(), "Error Loading Profile",
				"Exception occurred while reading file\n" + item.file.getAbsolutePath() + ": " + e);
		}
		finally {
			// add a document listener to the options field
			addDocumentListener();
			tableModel.addTableModelListener(tableListener);
			parsePathTableModel.addTableModelListener(parsePathTableListener);
			notifyContextChanged();
		}
	}
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