/** * Returns whether the given section was added to this tab. The section can * be appended if its tab attribute matches the tab id. The afterSection * attribute indicates the order in which the section should be appended. * * @param target * the section descriptor to append. */ protected boolean append(ISectionDescriptor target) { if (!target.getTargetTab().equals(id)) { return false; } if (insertSectionDescriptor(target)) { return true; } getSectionDescriptors().add(target); return true; }
/** * Appends the given section to a tab from the list. */ protected void appendToTabDescriptor(ISectionDescriptor section, List aTabDescriptors) { for (Iterator i = aTabDescriptors.iterator(); i.hasNext();) { TabDescriptor tab = (TabDescriptor) i.next(); if (tab.append(section)) { return; } } // could not append the section to any of the existing tabs - log error String message = MessageFormat.format(NO_TAB_ERROR, section.getId(), section.getTargetTab()); Bundle bundle = FrameworkUtil.getBundle(TabbedPropertyRegistry.class); IStatus status = new Status(IStatus.ERROR, bundle.getSymbolicName(), TabbedPropertyViewStatusCodes.NO_TAB_ERROR, message, null); Platform.getLog(bundle).log(status); }