Search in sources :

Example 1 with IListProperty

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;
}
Also used : IListProperty(org.eclipse.core.databinding.property.list.IListProperty) TreeViewer(org.eclipse.jface.viewers.TreeViewer) ObservableListTreeContentProvider(org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider) ObservableTreeItemStyledCellLabelProvider(org.jboss.tools.openshift.internal.ui.treeitem.ObservableTreeItemStyledCellLabelProvider) OpenShiftExplorerLabelProvider(org.jboss.tools.openshift.internal.ui.explorer.OpenShiftExplorerLabelProvider) MultiListProperty(org.eclipse.core.databinding.property.list.MultiListProperty)

Example 2 with IListProperty

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;
}
Also used : IListProperty(org.eclipse.core.databinding.property.list.IListProperty) TreeViewer(org.eclipse.jface.viewers.TreeViewer) ObservableListTreeContentProvider(org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider) ObservableTreeItemStyledCellLabelProvider(org.jboss.tools.openshift.internal.ui.treeitem.ObservableTreeItemStyledCellLabelProvider) MultiListProperty(org.eclipse.core.databinding.property.list.MultiListProperty)

Aggregations

IListProperty (org.eclipse.core.databinding.property.list.IListProperty)2 MultiListProperty (org.eclipse.core.databinding.property.list.MultiListProperty)2 ObservableListTreeContentProvider (org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 ObservableTreeItemStyledCellLabelProvider (org.jboss.tools.openshift.internal.ui.treeitem.ObservableTreeItemStyledCellLabelProvider)2 OpenShiftExplorerLabelProvider (org.jboss.tools.openshift.internal.ui.explorer.OpenShiftExplorerLabelProvider)1