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
if(root == n.getParentNode()) {
			Element child = (Element)l.item(i);
			String key = child.getAttribute(TAG_KEY);
			NodeList list = child.getElementsByTagName(TAG_ITEM);
			List valueList = new ArrayList();
			for (int j = 0; j < list.getLength(); j++){
				Element node = (Element)list.item(j);
				if(child == node.getParentNode()) {
					valueList.add(node.getAttribute(TAG_VALUE));
				}
			}
			String[] value = new String[valueList.size()];
			valueList.toArray(value);
			arrayItems.put(key,value);
		}
	}
	l = root.getElementsByTagName(TAG_SECTION);
	for (int i = 0; i < l.getLength(); i++){
		Node n = l.item(i);
		if(root == n.getParentNode()) {
			DialogSettings s = new DialogSettings("NoName");
			s.load(document,(Element)n);
			addSection(s);
		}
	}
}
/* (non-Javadoc)
 * Method declared on IDialogSettings.
 */
public void put(String key,String[] value) {