//--------------------------------------------------------------------------
// there seems to be a bug in the ISwitchNode.getCaseNodes(), need to file a bug
public static final IConditionalNode[] getCaseNodes(ISwitchNode node)
{
IBlockNode block = (IBlockNode) node.getChild(1);
int childCount = block.getChildCount();
ArrayList<IConditionalNode> retVal = new ArrayList<IConditionalNode>(
childCount);
for (int i = 0; i < childCount; i++)
{
IASNode child = block.getChild(i);
if (child instanceof IConditionalNode)
retVal.add((IConditionalNode) child);
}
return retVal.toArray(new IConditionalNode[0]);