/** * @see org.eclipse.ui.part.IPage#setFocus() */ @Override public void setFocus() { getControl().setFocus(); }
@SuppressWarnings("unchecked") @Override public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adaptableObject instanceof ProjectExplorer) { if (IPropertySheetPage.class == adapterType) return (T) new TabbedPropertySheetPage( new TabbedPropertySheetProjectExplorerContributor( (CommonNavigator) adaptableObject)); } return null; }
/** * Start listening to tab selection change events. */ private void startListening() { tabbedPropertySheetPage.addTabSelectionListener(this); }
tab = createTab(descriptor); currentTab = null; disposeTabs(descriptorToTab.values()); descriptorToTab = newTabs;
ITabbedPropertySheetPageContributor newContributor = getTabbedPropertySheetPageContributor(structuredSelection.getFirstElement()); i.next(); while (i.hasNext()) { newContributor = getTabbedPropertySheetPageContributor(i.next()); if (newContributor == null || !newContributor.getContributorId().equals(selectionContributorId)) { disposeContributor(); currentContributorId = contributor.getContributorId(); initContributor(currentContributorId); disposeContributor(); currentContributorId = selectionContributorId; initContributor(currentContributorId); overrideActionBars();
validateRegistry(selection); ITabDescriptor[] descriptors = registry.getTabDescriptors(part, currentSelection); updateTabs(descriptors); int lastTabSelectionIndex = getLastTabSelection(part, currentSelection); Object selectedTab = tabbedPropertyViewer .getElementAt(lastTabSelectionIndex); selectionQueueLocked = false; refreshTitleBar();
/** * Override the action bars for the selection based contributor. */ private void overrideActionBars() { if (registry.getActionProvider() != null ) { IActionProvider actionProvider = registry.getActionProvider(); actionProvider.setActionBars(contributor, getSite().getActionBars()); } }
/** * 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; } }
public void dispose() { if (xsdModelAdapter != null && xsdModelAdapter.getModelReconcileAdapter() != null) { xsdModelAdapter.getModelReconcileAdapter().removeListener(internalNodeAdapter); xsdModelAdapter = null; } super.dispose(); }
disposeTabs(descriptorToTab.values()); descriptorToTab = new HashMap();
/** * @see org.eclipse.ui.part.IPage#dispose() */ @Override public void dispose() { disposeContributor(); if (widgetFactory != null) { widgetFactory.dispose(); widgetFactory = null; } /** * Remove the part activation listener. */ if (cachedWorkbenchWindow != null) { cachedWorkbenchWindow.getPartService().removePartListener( partActivationListener); cachedWorkbenchWindow = null; } if (registry != null) { TabbedPropertyRegistryFactory.getInstance().disposeRegistry( contributor); registry = null; } contributor = null; currentSelection = null; }
cachedWorkbenchWindow = getSite().getWorkbenchWindow(); cachedWorkbenchWindow.getPartService().addPartListener( partActivationListener);
/** * @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); }
if (tabbedPage.getControl() instanceof Composite) Composite c = (Composite)tabbedPage.getControl(); Point p = c.getSize();
if (tabbedPage.getControl() instanceof Composite) Composite c = (Composite)tabbedPage.getControl(); int length = c.getChildren().length; for (int i = 0; i < length; i++)