}
return tableCellEditor;
}
private TableCellEditor createEditorForNativeType(ColumnInfo columnInfo, DatasetEditorTable table) {
DataEditorSettings dataEditorSettings = DataEditorSettings.getInstance(table.getDatasetEditor().getProject());
DBDataType dataType = columnInfo.getDataType();
DBNativeDataType nativeDataType = dataType.getNativeDataType();
DataTypeDefinition dataTypeDefinition = nativeDataType.getDataTypeDefinition();
GenericDataType genericDataType = dataTypeDefinition.getGenericDataType();
if (genericDataType == GenericDataType.NUMERIC) {
return new DatasetTableCellEditor(table);
}
else if (genericDataType == GenericDataType.DATE_TIME) {
DatasetTableCellEditorWithPopup tableCellEditor = new DatasetTableCellEditorWithPopup(table);
tableCellEditor.getEditorComponent().createCalendarPopup(false);
return tableCellEditor;
}
else if (genericDataType == GenericDataType.LITERAL) {
long dataLength = dataType.getLength();
if (dataLength < dataEditorSettings.getQualifiedEditorSettings().getTextLengthThreshold()) {
DatasetTableCellEditorWithPopup tableCellEditor = new DatasetTableCellEditorWithPopup(table);
tableCellEditor.getEditorComponent().createTextAreaPopup(true);
final DatasetEditorColumnInfo dseColumnInfo = (DatasetEditorColumnInfo) columnInfo;
DBColumn column = dseColumnInfo.getColumn();
DataEditorValueListPopupSettings valueListPopupSettings = dataEditorSettings.getValueListPopupSettings();
if (column.isForeignKey() || (dataLength <= valueListPopupSettings.getDataLengthThreshold() &&
(!column.isSinglePrimaryKey() || valueListPopupSettings.isActiveForPrimaryKeyColumns()))) {
ListPopupValuesProvider valuesProvider = new ListPopupValuesProvider() {