mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-06 08:35:26 +02:00
null attributes need to be allowed (in particular for delete() case).
This commit is contained in:
parent
4d68ac7d71
commit
aa1f2c1034
1 changed files with 16 additions and 16 deletions
|
@ -757,24 +757,24 @@ public final class DataElement implements IDataElement
|
|||
*/
|
||||
public void setAttribute(int attributeIndex, String attribute)
|
||||
{
|
||||
if (attribute != null)
|
||||
if ((attributeIndex == DE.A_NAME) && (getAttribute(DE.A_NAME).equals(getAttribute(DE.A_VALUE))))
|
||||
{
|
||||
if ((attributeIndex == DE.A_NAME) && (getAttribute(DE.A_NAME).equals(getAttribute(DE.A_VALUE))))
|
||||
{
|
||||
_attributes[DE.A_VALUE] = attribute;
|
||||
}
|
||||
else if (attributeIndex == DE.A_DEPTH)
|
||||
{
|
||||
_depth = Integer.parseInt(attribute);
|
||||
}
|
||||
else if (attributeIndex == DE.A_TYPE)
|
||||
{
|
||||
_descriptor = null;
|
||||
}
|
||||
|
||||
_attributes[attributeIndex] = attribute;
|
||||
_isUpdated = false;
|
||||
_attributes[DE.A_VALUE] = attribute;
|
||||
}
|
||||
else if (attributeIndex == DE.A_DEPTH)
|
||||
{
|
||||
if (attribute != null)
|
||||
_depth = Integer.parseInt(attribute);
|
||||
else
|
||||
_depth = 0;
|
||||
}
|
||||
else if (attributeIndex == DE.A_TYPE)
|
||||
{
|
||||
_descriptor = null;
|
||||
}
|
||||
|
||||
_attributes[attributeIndex] = attribute;
|
||||
_isUpdated = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue