{
int numItems = comment.def.metaData.items.size();
for (int x = 0; x < numItems; x++)
{
Node md = comment.def.metaData.items.at(x);
MetaDataNode mdi = (md instanceof MetaDataNode) ? (MetaDataNode)(md) : null;
// cn: why not just dump all the metaData ???
if (mdi != null && mdi.getId() != null)
{
// these metaData types can have their own DocComment associated with them, though they might also have no comment.
if (mdi.getId().equals(StandardDefs.MD_STYLE) || mdi.getId().equals(StandardDefs.MD_EVENT) || mdi.getId().equals(StandardDefs.MD_EFFECT)
|| mdi.getId().equals(StandardDefs.MD_SKINSTATE) || mdi.getId().equals(StandardDefs.MD_ALTERNATIVE)
|| mdi.getId().equals(StandardDefs.MD_DISCOURAGEDFORPROFILE)
|| mdi.getId().equals(StandardDefs.MD_EXPERIMENTAL))
{
if (x+1 < numItems) // if it has a comment, it will be the sequentially next DocCommentNode
{
Node next = comment.def.metaData.items.at(x+1);
DocCommentNode metaDataComment = (next instanceof DocCommentNode) ? (DocCommentNode)next : null;
if (metaDataComment != null)
{
createMetaDataComment(fullname, mdi, false, metaDataComment);
x++;
}
else // emit it even if it doesn't have a comment.
{
createMetaDataComment(fullname, mdi, true, null);
}
}
else
{
createMetaDataComment(fullname, mdi, true, null);
}
}
else if (mdi.getId().equals(StandardDefs.MD_BINDABLE) || mdi.getId().equals(StandardDefs.MD_DEPRECATED) || mdi.getId().equals(StandardDefs.MD_EXCLUDE))
{
createMetaDataComment(fullname, mdi, true, null);
}
else if (mdi.getId().equals(StandardDefs.MD_DEFAULTPROPERTY))
{
hasDefaultProperty = true;
createMetaDataComment(fullname, mdi, true, null);
}
else if (mdi.getId().equals(StandardDefs.MD_SKINPART))
{
String className = fullname.substring(0, fullname.indexOf("/"));
if(comment.getId() != null)
{
createSkinPartMetaDataComment(className, mdi, false, comment);