s_log.error("onExecute: _info[0] isn't an instance of ITableInfo: class="
+ _info[0].getClass().getName());
return;
}
ITableInfo ti = (ITableInfo) _info[0];
TableColumnInfo[] columns = _session.getSQLConnection().getSQLMetaData().getColumnInfo(ti);
// If there is only one column in the table,
if (columns.length == 1)
{
if (s_log.isDebugEnabled()) {
s_log.debug("Table has exactly one column, so presenting the modify column dialog");
}
columnToModify = columns[0];
showCustomDialog();
} else
{
if (s_log.isDebugEnabled()) {
s_log.debug("Table has exactly " + columns.length
+ " columns, so presenting the column list selection dialog");
}
listDialog = new ColumnListDialog(columns, ColumnListDialog.MODIFY_COLUMN_MODE);
listDialog.setTableName(ti.getQualifiedName());
listDialog.setSingleSelection();
listDialog.addColumnSelectionListener(new ColumnListSelectionActionListener());
listDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
listDialog.setVisible(true);
}