/** * Creates a new page for the provided key. Use the returned composite to * create children in it. * * @param key * the page key * @return the newly created page composite */ public Composite createPage(Object key) { Composite page = createPage(); pages.put(key, page); return page; } /**
/** * Creates a new page for the provided key. Use the returned composite to * create children in it. * * @param key * the page key * @return the newly created page composite */ public Composite createPage(Object key) { Composite page = createPage(); pages.put(key, page); return page; } /**
/** * Shows a page with no children to be used if the desire is to not show * any registered page. */ public void showEmptyPage() { if (emptyPage == null) { emptyPage = createPage(); emptyPage.setLayout(new GridLayout()); } pageBook.showPage(emptyPage); currentPage = emptyPage; reflow(true); } /**
/** * Shows a page with no children to be used if the desire is to not show * any registered page. */ public void showEmptyPage() { if (emptyPage == null) { emptyPage = createPage(); emptyPage.setLayout(new GridLayout()); } pageBook.showPage(emptyPage); currentPage = emptyPage; reflow(true); } /**
private void pluginSelected(IPluginModelBase model, boolean checked) { TracingPropertySource source = getPropertySource(model); if (source == null) { fPageBook.showEmptyPage(); } else { PageBookKey key = new PageBookKey(model, checked); if (!fPageBook.hasPage(key) || source.isChanged()) { Composite parent = fPageBook.createPage(key); source.createContents(parent, checked); source.setChanged(false); } fPageBook.showPage(key); } }
@Override public void widgetSelected(SelectionEvent e) { disposePropertySources(); fMasterOptions.clear(); fMasterOptions.putAll(PDECore.getDefault().getTracingOptionsManager().getTracingTemplateCopy()); Object elements[] = fPluginViewer.getCheckedElements(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof IPluginModelBase) { IPluginModelBase model = (IPluginModelBase) (elements[i]); TracingPropertySource source = getPropertySource(model); PageBookKey key = new PageBookKey(model, true); Composite parent = fPageBook.createPage(key); source.createContents(parent, true); source.setChanged(false); } } IStructuredSelection selec = fPluginViewer.getStructuredSelection(); if (selec.getFirstElement() instanceof IPluginModelBase) { IPluginModelBase model = (IPluginModelBase) fPluginViewer.getStructuredSelection().getFirstElement(); pluginSelected(model, fPluginViewer.getChecked(model)); } } });
contentComposite = contentPageBook.createPage(page.getId());
@Override public void run() { if (!pageBook.hasPage(key)) { Composite parent = pageBook.createPage(key); fpage.createContents(parent); parent.setData(fpage); } //commit the current page if (oldPage!=null && oldPage.isDirty()) oldPage.commit(false); //refresh the new page if (fpage.isStale()) fpage.refresh(); fpage.selectionChanged(masterPart, currentSelection); pageBook.showPage(key); } });
BusyIndicator.showWhile(pageBook.getDisplay(), () -> { if (!pageBook.hasPage(key)) { Composite parent = pageBook.createPage(key); fpage.createContents(parent); parent.setData(fpage);