{
ArrayList<VerilogOutlineElement> children=new ArrayList<VerilogOutlineElement>();
//if we have a module, it must have instatiations
if (parentElement instanceof VerilogModuleElement) {
VerilogModuleElement moduleElement = (VerilogModuleElement) parentElement;
for(OutlineElement child : moduleElement.getChildren()){
if(child instanceof VerilogInstanceElement){
VerilogInstanceElement instance = (VerilogInstanceElement) child;
children.add(instance);
}
}
}
//if we have an instance, find the module that goes with it
if (parentElement instanceof VerilogInstanceElement) {
VerilogInstanceElement instance = (VerilogInstanceElement) parentElement;
//get the module
if(m_ModuleList.containsKey(instance.getModuleType())){
//if the module has instantiations
VerilogModuleElement moduleElement=m_ModuleList.get(instance.getModuleType());
for(OutlineElement child : moduleElement.getChildren()){
if(child instanceof VerilogInstanceElement){
VerilogInstanceElement childInstance = (VerilogInstanceElement) child;
children.add(childInstance);
}
}