/** * create a new tabbed property sheet page. * * @param tabbedPropertySheetPageContributor * the tabbed property sheet page contributor. * @param showTitleBar * boolean indicating if the title bar should be shown; * default value is <code>true</code> * @since 3.5 */ public TabbedPropertySheetPage( ITabbedPropertySheetPageContributor tabbedPropertySheetPageContributor, boolean showTitleBar) { hasTitleBar = showTitleBar; contributor = tabbedPropertySheetPageContributor; tabToComposite = new HashMap(); selectionQueue = new ArrayList(10); tabSelectionListeners = new ArrayList(); initContributor(contributor.getContributorId()); }
/** * Indicates that the given contributor no longer needs a registry. The * registry will be disposed when no other contributor of the same type * needs it. * * @param target * the contributor; */ public void disposeRegistry(ITabbedPropertySheetPageContributor target) { /** * Get the contributor id from the ITabbedPropertySheetPageContributor * interface */ String key = target.getContributorId(); CacheData data = (CacheData) idToCacheData.get(key); if (data != null) { data.references.remove(target); if (data.references.isEmpty()) { data.registry.dispose(); idToCacheData.remove(key); } } } }
/** * Creates a registry for the given contributor. * * @param target * the contributor. * @return a registry for the given contributor. */ public TabbedPropertyRegistry createRegistry( ITabbedPropertySheetPageContributor target) { /** * Get the contributor id from the ITabbedPropertySheetPageContributor * interface */ String key = target.getContributorId(); CacheData data = (CacheData) idToCacheData.get(key); if (data == null) { data = new CacheData(); data.registry = new TabbedPropertyRegistry(key); data.references = new ArrayList(5); idToCacheData.put(key, data); } data.references.add(target); // keeps track of contributor using the same registry return data.registry; }
String selectionContributorId = newContributor.getContributorId(); if (selectionContributorId.equals(currentContributorId)) { while (i.hasNext()) { newContributor = getTabbedPropertySheetPageContributor(i.next()); if (newContributor == null || !newContributor.getContributorId().equals(selectionContributorId)) { currentContributorId = contributor.getContributorId(); initContributor(currentContributorId);
&& !part.getSite().getId().equals(contributor.getContributorId())) {
if (contributor.getContributorId().equals(contributorId)) {