if (sectionComps != null && !sectionComps.isEmpty()) {
try {
String componentUID = compOpened.getUid();
if (contains(componentUID)) {
if (compOpened instanceof TCComponentQuery) {
ISectionComponent tempSectComp = getSectionComponent(componentUID);
if (tempSectComp != null && tempSectComp.getTitle().equals(info[0])) {
toAdd = false;
}
} else {
toAdd = false;
}
}
} catch (Exception ex) {
}
}
if (toAdd) {
Icon icon = TCTypeRenderer.getIcon(compOpened);
ISectionComponent c = null;
if (compOpened instanceof TCComponentCCSearchContext) {
return;
}
if (compOpened instanceof TCComponentQuery) {
// Create the query section component
if (info != null) {
c = QuerySectionComponent.createQuerySectionComponent(compOpened, this, (String) info[0], (String[]) info[1], (String[]) info[2]);
if (info.length == 5) {
((QuerySectionComponent) c).setMultiLevelSearch(((Boolean) info[4]).booleanValue());
}
}
// Set the icon on the section component
icon = Registry.getRegistry(this).getImageIcon("TcQuery.ICON");
} else {
c = SectionComponent.createSectionComponent(compOpened, this);
c.setUseDefaultOpenCommand(false);
}
if (c != null) {
// Set the icon on the section component
c.setIcon(icon);
c.setImage(getImageForComponent(compOpenedArray[0]));
// Set tooltip
String tooltip = e.getToolTip();
if (tooltip != null && tooltip.length() > 0) {
c.setToolTipText(tooltip);
}
sectionComps.add(c);
}
}