TableViewerColumn nameColumn = createSingleColumn(tableViewer, nameColumnTitle,
nameColumnWidth);
nameColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(final Object element) {
FilterModel filterModel = (FilterModel) element;
String filterName = filterModel.getFilterName();
logger.debug("New filter name: {}", filterName);
return filterName;
}
});
nameColumn.setEditingSupport(new FilterNameCellEditor(tableViewer));
final String descriptionColumnTitle = "Description";
final int descriptionColumnWidth = 300;
TableViewerColumn desriptionColumn = createSingleColumn(tableViewer,
descriptionColumnTitle,
descriptionColumnWidth);
desriptionColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(final Object element) {
FilterModel filterModel = (FilterModel) element;
String filterDescription = filterModel.getFilterDescr();
logger.debug("Filter description: {}", filterDescription);
return filterDescription;
}
});
desriptionColumn.setEditingSupport(new FilterDescriptionCellEditor(tableViewer));