I am stuck in one of the scenerio. Based on input text field value i click button to display result in tableviewer. Below is the code,
btnSearch.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
String plant=text_workplace.getText();
IStructuredSelection selection = (IStructuredSelection) m_workplaceViewer
.getSelection();
workplaceDetail = (WorkplaceDetail) selection.getFirstElement();
if (plant!=""){
workplaceDetail= workplaceDaoImpl.getWorkplaceDetailsSearchByPlant(plant);
}
m_workplaceViewer.setInput(workplaceDetail);
m_workplaceViewer.refresh();
m_bindingContext.updateModels();
}
});
I am able to get result of query fired on button click in console, but i don get result in table viewer, instead get below exception
org.eclipse.core.runtime.AssertionFailedException: assertion failed: This content provider only works with input of type IObservableList