1. LabelProvider:
isLableProperty要return true
或者就extends jface.viewer的LabelProvider
2.在tableViewer上加Cell Modifier
CusCellModifier cellModifier = new CusCellModifier(tableViewer);
tableViewer.setCellModifier(cellModifier);
tableViewer.setCellEditors(new CellEditor[] {
new ComboBoxCellEditor(table, new String[0]) });
cellModifier.stickCellEditors();
tableViewer.setColumnProperties(getColumnProperties());
3.CusCellModifier
public class CusCellModifier
implements ICellModifier
{
public void stickCellEditors()
{
comboBoxCellEditor = (ComboBoxCellEditor)getCellEditorForProperty("AAA");
comboBoxCellEditor.setItems(getItemsForFieldCombo());
setVisibleItemCount("AAA");
}
}