Bug 24168 [Dialogs] XML dialog settings cannot start with a comment
I created a dialog_settings.xml for my plugin, and entered on the very first line a comment: the settings then fail to load with ClassCastException. An easy workaround is to push the comment down into the XML tree. org.eclipse.jface.dialogs.DialogSettings line 181: Element root = (Element) document.getFirstChild(); If the first child is not an element (e.g. a comment), ClassCastException is thrown.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
public String getName() {
	return name;
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public IDialogSettings getSection(String sectionName) {
	return (IDialogSettings)sections.get(sectionName);
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public IDialogSettings[] getSections() {
	Collection values = sections.values();
	DialogSettings[] result = new DialogSettings[values.size()];
	values.toArray(result);
	return result;
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public void load(Reader r) {
	Document document = null;
	try {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder parser = factory.newDocumentBuilder();
		document = parser.parse(new InputSource(r));
		Element root = (Element) document.getFirstChild();
		load(document, root);
	} catch (ParserConfigurationException e) {