/** * Get the section implementation that provides the list of tabs. In our * implementation, all the sections provide the list of tabs, so we select * the first section from the tab descriptor. * * @return the section. */ private AbstractOverridableTabListPropertySection getOverridableTabListPropertySection() { TabContents tab = tabbedPropertySheetPage.getCurrentTab(); Assert.isNotNull(tab); if (tab != null) { ISection section = tab.getSectionAtIndex(0); if (section instanceof AbstractOverridableTabListPropertySection) { return (AbstractOverridableTabListPropertySection) section; } } return null; } }
/** * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ @Override public Object[] getElements(Object inputElement) { if (tabbedPropertySheetPage.getCurrentTab() == null) { /* * In this case, return the default list of tabs from the registry. * The contributor will not have had a chance to load and override * the tabs. */ return registry.getTabDescriptors(currentPart, (ISelection) inputElement); } return getOverrideTabs(inputElement); }