mediator = new PreferencesMediator(preferences);
TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
TabItem item = new TabItem(tabFolder, SWT.NONE);
PreferencesTab generalTab = new GeneralTab(mediator);
item.setText(generalTab.getTabName());
item.setControl(generalTab.getTabControl(tabFolder));
TabItem item2 = new TabItem(tabFolder, SWT.NONE);
PreferencesTab advancedTab = new AdvancedTab(mediator);
item2.setText(advancedTab.getTabName());
item2.setControl(advancedTab.getTabControl(tabFolder));
TabItem item3 = new TabItem(tabFolder, SWT.NONE);
PreferencesTab userDefTab = new UserDefinedTab(mediator);
item3.setText(userDefTab.getTabName());
item3.setControl(userDefTab.getTabControl(tabFolder));
tabFolder.pack();
parent.pack();
return tabFolder;