} catch (HdlParserException e) {
e.printStackTrace();
}
if (entityName != null){
OutlineDatabase database = getOutlineDatabase();
OutlineContainer outline = database.getOutlineContainer(getFile());
Object[] children= outline.getTopLevelElements();
for (int i=0;i<children.length;i++){
if (children[i] instanceof EntityDeclElement) {
EntityDeclElement entityDecl = (EntityDeclElement) children[i];
//if we find an entity declaration, add the ports and generics
if (entityDecl.getName().equalsIgnoreCase(entityName)) {
//get the entity's children
OutlineElement[] enitityChildren=entityDecl.getChildren();
for(int entChildIdx=0;entChildIdx<enitityChildren.length;entChildIdx++){
if( enitityChildren[entChildIdx].getName().equalsIgnoreCase(name)){
results.add(enitityChildren[entChildIdx]);
}
}
}
}
}
}
{
OutlineDatabase database = getOutlineDatabase();
PackageDeclElement packs[] = database.findTopLevelPackages();
for (int p=0;p<packs.length;p++){
PackageDeclElement packDecl = packs[p];
OutlineElement[] enitityChildren=packDecl.getChildren();
for(int entChildIdx=0;entChildIdx<enitityChildren.length;entChildIdx++){
if( enitityChildren[entChildIdx].getName().equalsIgnoreCase(name)){