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
} catch (IOException e) {
	} catch (SAXException e) {
	}
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public void load(String fileName) throws IOException {
	FileInputStream stream = new FileInputStream(fileName);
	InputStreamReader reader = new InputStreamReader(stream, "utf-8");
	load(reader);
	reader.close();
}
/* (non-Javadoc)
 * Load the setting from the <code>document</code>
 */
private void load(Document document,Element root) {
	name = root.getAttribute(TAG_NAME);
	NodeList l = root.getElementsByTagName(TAG_ITEM);
	for (int i = 0; i < l.getLength(); i++){
		Node n = l.item(i);
		if(root == n.getParentNode()) {
			String key = ((Element)l.item(i)).getAttribute(TAG_KEY);
			String value = ((Element)l.item(i)).getAttribute(TAG_VALUE);
			items.put(key,value);
		}
	}
	l = root.getElementsByTagName(TAG_LIST);
	for (int i = 0; i < l.getLength(); i++){
		Node n = l.item(i);