CTabFolder tabs = SWTUtil.createTabFolder(parent);
ICompositeFragmentFactory[] factories = WizardFragmentsFactoryRegistry
.getFragmentsFactories(FRAGMENT_GROUP_ID);
for (ICompositeFragmentFactory element : factories) {
CTabItem tabItem = new CTabItem(tabs, SWT.BORDER);
CompositeFragment fragment = element.createComposite(tabs, this);
fragment.setData(phpExeItem);
if (fragment instanceof IPHPExeCompositeFragment) {
((IPHPExeCompositeFragment) fragment)
.setExistingItems(existingItems);
}
tabItem.setText(fragment.getDisplayName());
tabItem.setControl(fragment);
runtimeComposites.add(fragment);
}
getShell().setText(Messages.PHPExeEditDialog_1);
tabs.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
CTabItem item = (CTabItem) e.item;
CompositeFragment fragment = (CompositeFragment) item
.getControl();
setTitle(fragment.getTitle());
fragment.validate();
}
});
return tabs;
}