Search in sources :

Example 1 with TypesContentProvider

use of eu.esdihumboldt.hale.ui.common.definition.viewer.TypesContentProvider in project hale by halestudio.

the class TypeDefinitionDialog method setupViewer.

@Override
protected void setupViewer(TreeViewer viewer, TypeDefinition initialSelection) {
    viewer.setLabelProvider(new DefinitionLabelProvider(viewer));
    viewer.setContentProvider(new TypesContentProvider(viewer));
    viewer.setInput(types);
    if (initialSelection != null) {
        viewer.setSelection(new StructuredSelection(initialSelection));
    }
}
Also used : DefinitionLabelProvider(eu.esdihumboldt.hale.ui.common.definition.viewer.DefinitionLabelProvider) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) TypesContentProvider(eu.esdihumboldt.hale.ui.common.definition.viewer.TypesContentProvider)

Aggregations

DefinitionLabelProvider (eu.esdihumboldt.hale.ui.common.definition.viewer.DefinitionLabelProvider)1 TypesContentProvider (eu.esdihumboldt.hale.ui.common.definition.viewer.TypesContentProvider)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1