mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 23:33:57 +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
|
@ -756,8 +756,6 @@ public final class DataElement implements IDataElement
|
||||||
* @param attribute the new value for the specified attribute
|
* @param attribute the new value for the specified attribute
|
||||||
*/
|
*/
|
||||||
public void setAttribute(int attributeIndex, String attribute)
|
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))))
|
||||||
{
|
{
|
||||||
|
@ -765,7 +763,10 @@ public final class DataElement implements IDataElement
|
||||||
}
|
}
|
||||||
else if (attributeIndex == DE.A_DEPTH)
|
else if (attributeIndex == DE.A_DEPTH)
|
||||||
{
|
{
|
||||||
|
if (attribute != null)
|
||||||
_depth = Integer.parseInt(attribute);
|
_depth = Integer.parseInt(attribute);
|
||||||
|
else
|
||||||
|
_depth = 0;
|
||||||
}
|
}
|
||||||
else if (attributeIndex == DE.A_TYPE)
|
else if (attributeIndex == DE.A_TYPE)
|
||||||
{
|
{
|
||||||
|
@ -775,7 +776,6 @@ public final class DataElement implements IDataElement
|
||||||
_attributes[attributeIndex] = attribute;
|
_attributes[attributeIndex] = attribute;
|
||||||
_isUpdated = false;
|
_isUpdated = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets all of the attributes of the element.
|
* Sets all of the attributes of the element.
|
||||||
|
|
Loading…
Add table
Reference in a new issue