use of org.eclipse.core.databinding.property.list.IListProperty in project jbosstools-openshift by jbosstools.
the class BuildConfigWizardPage method createBuildConfigsViewer.
private TreeViewer createBuildConfigsViewer(Tree tree, IBuildConfigPageModel model, DataBindingContext dbc) {
TreeViewer buildConfigsViewer = new TreeViewer(tree);
IListProperty childrenProperty = new MultiListProperty(new IListProperty[] { BeanProperties.list(IBuildConfigPageModel.PROPERTY_BUILDCONFIGS), BeanProperties.list(ObservableTreeItem.PROPERTY_CHILDREN) });
ObservableListTreeContentProvider contentProvider = new ObservableListTreeContentProvider(childrenProperty.listFactory(), null);
buildConfigsViewer.setContentProvider(contentProvider);
buildConfigsViewer.setLabelProvider(new ObservableTreeItemStyledCellLabelProvider());
buildConfigsViewer.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
buildConfigsViewer.setComparator(ProjectViewerComparator.createProjectTreeSorter(new OpenShiftExplorerLabelProvider()));
buildConfigsViewer.setInput(model);
return buildConfigsViewer;
}
use of org.eclipse.core.databinding.property.list.IListProperty in project jbosstools-openshift by jbosstools.
the class ApplicationSourceListPage method createServerTemplatesViewer.
private TreeViewer createServerTemplatesViewer(Composite parent, final Text templateFilterText) {
TreeViewer viewer = new TreeViewer(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
IListProperty childrenProperty = new MultiListProperty(new IListProperty[] { BeanProperties.list(IApplicationSourceListPageModel.PROPERTY_APP_SOURCES), BeanProperties.list(ObservableTreeItem.PROPERTY_CHILDREN) });
ObservableListTreeContentProvider contentProvider = new ObservableListTreeContentProvider(childrenProperty.listFactory(), null);
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new ObservableTreeItemStyledCellLabelProvider());
viewer.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
viewer.setComparator(new ApplicationSourceComparator());
viewer.addFilter(new AppSourceViewerFilter(templateFilterText));
templateFilterText.addKeyListener(onFilterKeyPressed(viewer));
viewer.setInput(model);
return viewer;
}
Aggregations