use of org.hibernate.eclipse.console.workbench.DeferredContentProvider in project jbosstools-hibernate by jbosstools.
the class TableFilterView method createTreeViewer.
protected TreeViewer createTreeViewer() {
TreeViewer viewer = new TreeViewer(tree);
viewer.setLabelProvider(new AnyAdaptableLabelProvider());
viewer.setContentProvider(new DeferredContentProvider());
viewer.setInput(null);
return viewer;
}
use of org.hibernate.eclipse.console.workbench.DeferredContentProvider in project jbosstools-hibernate by jbosstools.
the class TablePropertiesBlock method createTreeSelectionDialog.
private CheckedTreeSelectionDialog createTreeSelectionDialog() {
return new CheckedTreeSelectionDialog(getComposite().getShell(), new AnyAdaptableLabelProvider(), new DeferredContentProvider()) {
protected Composite createSelectionButtons(Composite composite) {
Composite buttonComposite = new Composite(composite, SWT.RIGHT);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
buttonComposite.setLayout(layout);
buttonComposite.setFont(composite.getFont());
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL);
data.grabExcessHorizontalSpace = true;
composite.setData(data);
Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, MapperMessages.TablePropertiesBlock_select_all_children, false);
SelectionListener listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
IStructuredSelection viewerElements = (IStructuredSelection) getTreeViewer().getSelection();
Iterator<?> iterator = viewerElements.iterator();
while (iterator.hasNext()) {
getTreeViewer().setSubtreeChecked(iterator.next(), true);
}
updateOKStatus();
}
};
selectButton.addSelectionListener(listener);
Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, MapperMessages.TablePropertiesBlock_deselect_all, false);
listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
getTreeViewer().setCheckedElements(new Object[0]);
updateOKStatus();
}
};
deselectButton.addSelectionListener(listener);
return buttonComposite;
}
protected boolean evaluateIfTreeEmpty(Object input) {
return false;
}
};
}
use of org.hibernate.eclipse.console.workbench.DeferredContentProvider in project jbosstools-hibernate by jbosstools.
the class TypeMappingView method initialize.
protected void initialize() {
super.initialize();
tableViewer = createTypeMappingViewer();
viewer = new TreeViewer(tree);
viewer.setLabelProvider(new AnyAdaptableLabelProvider());
viewer.setContentProvider(new DeferredContentProvider());
viewer.setInput(null);
}
Aggregations