{
// Check the parent - if it's an instance then we want to use these
// nodes to get our property values from. If not, then it's the root
// and we don't need to specify destination
IASNode parent = propertySpecifier.getParent();
if (parent instanceof IMXMLInstanceNode)
{
IMXMLInstanceNode parentInstance = (IMXMLInstanceNode)parent;
String parentId = parentInstance.getEffectiveID();
assert parentId != null;
String propName = propertySpecifier.getName();
if (getProject().getTargetSettings().getMxmlChildrenAsData())
{
addItemsIL.addInstruction(OP_pushstring, "destination");
addItemsIL.addInstruction(OP_pushtrue); // simple type
addItemsIL.addInstruction(OP_pushstring, parentId);
addItemsIL.addInstruction(OP_pushstring, "propertyName");
addItemsIL.addInstruction(OP_pushtrue); // simple type
addItemsIL.addInstruction(OP_pushstring, propName);
addItemsCounter += 2;
}
else
{
context.addInstruction(OP_dup); // stack: ..., addItems, addItems
context.addInstruction(OP_pushstring, parentId);
context.addInstruction(OP_setproperty, new Name("destination"));
// stack: ..., addItems
context.addInstruction(OP_dup); // stack: ..., addItems, addItems
context.addInstruction(OP_pushstring, propName);
context.addInstruction(OP_setproperty, new Name("propertyName"));
// stack: ..., addItems
}
}
}
//---------------------------------------------------------------
// Third property set: position and relativeTo
String positionPropertyValue = null;
String relativeToPropertyValue = null;
// look to see if we have any sibling nodes that are not state dependent
// that come BEFORE us
IASNode instanceParent = instanceNode.getParent();
IASNode prevStatelessSibling=null;
for (int i=0; i< instanceParent.getChildCount(); ++i)
{
IASNode sib = instanceParent.getChild(i);
if (sib instanceof IMXMLInstanceNode)
{
// stop looking for previous nodes when we find ourself
if (sib == instanceNode)