try {
MapType mapType = MapType.get(subtype);
MapNodeObject parent = (MapNodeObject) getParent();
Label labelObj = parent.getSourceLabel();
IAttribute a = labelObj.getAttribute(listname);
if(a == null){
a = JavaAttribute.newAttribute(
labelObj,
listname,
null,
null,
Class.forName(subtype),
MapType.get("list"),
"list",
mapType,
subtype
);
labelObj.getAttributes().add(a);
}
MapNodeList mnl = new MapNodeList(a, parent);
if(mapType.isPrimitive()){
mnl.setSubType(a.getSubTypeText());
mnl.setList((List<Object>)list);
}else {
mnl.setSubType(a.getSubTypeText());
mnl.setList((List<Object>)list);
if( list!=null ) for(Object obj2 : ((List)list)){
loadObjects(mnl, currentGroup,(String) null, obj2);
}
}