Search in sources :

Example 1 with TypePropertyContentProvider

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

the class PropertyDefinitionDialog method setupViewer.

@Override
protected void setupViewer(TreeViewer viewer, EntityDefinition initialSelection) {
    viewer.setLabelProvider(new DefinitionLabelProvider(viewer));
    viewer.setContentProvider(new TreePathProviderAdapter(new TypePropertyContentProvider(viewer)));
    viewer.setInput(parentType);
    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) TreePathProviderAdapter(eu.esdihumboldt.hale.ui.util.viewer.tree.TreePathProviderAdapter) TypePropertyContentProvider(eu.esdihumboldt.hale.ui.common.definition.viewer.TypePropertyContentProvider)

Aggregations

DefinitionLabelProvider (eu.esdihumboldt.hale.ui.common.definition.viewer.DefinitionLabelProvider)1 TypePropertyContentProvider (eu.esdihumboldt.hale.ui.common.definition.viewer.TypePropertyContentProvider)1 TreePathProviderAdapter (eu.esdihumboldt.hale.ui.util.viewer.tree.TreePathProviderAdapter)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1