use of org.jboss.tools.hibernate.search.toolkit.docs.ExploreDocsTabBuilder in project jbosstools-hibernate by jbosstools.
the class IndexToolkitView method createPartControl.
@Override
public void createPartControl(Composite parent) {
parent.setLayout(new GridLayout(1, true));
this.consoleConfigCombo = new ConfigurationCombo(parent, initialConsoleConfig == null ? null : initialConsoleConfig.getName());
final CTabFolder folder = new CTabFolder(parent, SWT.TOP);
folder.setLayoutData(new GridData(GridData.FILL, SWT.FILL, true, true));
ConsoleConfiguration consoleConfig = KnownConfigurations.getInstance().find(this.consoleConfigCombo.getConsoleConfigSelected());
final CTabItem analyzersTab = new CTabItem(folder, SWT.NONE);
analyzersTab.setText(ANALYZERS_TAB_NAME);
final AnalyzersTabBuilder analyzersBuilder = AnalyzersTabBuilder.getInstance();
analyzersTab.setControl(analyzersBuilder.getTab(folder, consoleConfig));
final CTabItem exploreDocsTab = new CTabItem(folder, SWT.NONE);
exploreDocsTab.setText(EXPLORE_DOCS_TAB_NAME);
final ExploreDocsTabBuilder exploreDocsBuilder = ExploreDocsTabBuilder.getInstance();
exploreDocsTab.setControl(exploreDocsBuilder.getTab(folder, consoleConfig));
final CTabItem searchTab = new CTabItem(folder, SWT.NONE);
searchTab.setText(SEARCH_TAB_NAME);
final SearchTabBuilder searchBuilder = SearchTabBuilder.getInstance();
searchTab.setControl(searchBuilder.getTab(folder, consoleConfig));
folder.setSelection(0);
this.consoleConfigCombo.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
ConsoleConfiguration consoleConfig = KnownConfigurations.getInstance().find(((Combo) e.getSource()).getText());
analyzersTab.setControl(analyzersBuilder.getTab(folder, consoleConfig));
exploreDocsTab.setControl(exploreDocsBuilder.getTab(folder, consoleConfig));
searchTab.setControl(searchBuilder.getTab(folder, consoleConfig));
}
});
}
Aggregations