Community
Participate
Working Groups
Calling clear() on org.eclipse.cdt.internal.core.settings.model.xml.XmlStorageElement does not remove all attributes from an element. Example: Calling clear on an element having 3 attributes(a, b, c)will only remove 2 attributes (a, c). The b attribute will not be cleared The issue seems to be caused by following code in the clear() method and the way attributes are removed from the NamedNodeMap. NamedNodeMap map = fElement.getAttributes(); for(int i = 0; i < map.getLength(); i++){ Node attr = map.item(i); if(isPropertyAlowed(attr.getNodeName())) map.removeNamedItem(attr.getNodeName()); }
The situation occurs when writing properties via ICStorageElement.
Thank you Ruediger for the bug report and analysis. Can you provide a gerrit with a fix that resolves your issue?