use of org.talend.core.ui.proposal.AutoConversionProposalProvider in project tdi-studio-se by Talend.
the class AutoConversionTypesEditorView method createConversionFunctionColumn.
private TableViewerCreatorColumn createConversionFunctionColumn(TableViewerCreator<AutoConversionType> tableViewerCreator) {
TableViewerCreatorColumn column = new TableViewerCreatorColumn(tableViewerCreator);
//$NON-NLS-1$
column.setTitle(Messages.getString("AutoConversionTypesEditor.table.column.conversionFunction"));
column.setBeanPropertyAccessors(new IBeanPropertyAccessors<AutoConversionType, String>() {
@Override
public String get(AutoConversionType bean) {
return bean.getConversionFunction();
}
@Override
public void set(AutoConversionType bean, String value) {
bean.setConversionFunction(value);
}
});
column.setModifiable(true);
column.setWeight(60);
column.setMinimumWidth(50);
//$NON-NLS-1$
column.setDefaultInternalValue("");
AutoConversionProposalProvider functionProposalProvider = new AutoConversionProposalProvider();
TextCellEditorWithProposal textCellEditor = new TextCellEditorWithProposal(tableViewerCreator.getTable(), column);
textCellEditor.setContentProposalProvider(functionProposalProvider);
column.setCellEditor(textCellEditor);
return column;
}
Aggregations