* @author <a href="mailto:shushanlee@msn.com">liss</a>
* @param e
* @see javax.swing.event.PopupMenuListener#popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent)
*/
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
MetadataTable metadataTable = (MetadataTable) ui;
JGeneratorFrame jGeneratorFrame = (JGeneratorFrame) metadataTable.getParentComponent();
JComboBox datasourceComboBox = jGeneratorFrame.getDataSourceComboBox();
Object selectedItem = datasourceComboBox.getSelectedItem();
String datasourceName = StringUtils.toString(selectedItem);
System.out.println("datasourceName=" + datasourceName);
int selectedRowIndex = metadataTable.getSelectedRow();
System.out.println("selectedRowIndex=" + selectedRowIndex);
Object selectedTableCellValue = metadataTable.getValueAt(selectedRowIndex, MetadataTableModel.REFERENCING_TABLE_INDEX);
String referencingTableName = StringUtils.toString(selectedTableCellValue);
System.out.println("referencingTableName=" + referencingTableName);
Vector dataVector = metadataService.getTableColumns(datasourceName, referencingTableName);
JComboBox comboBox = (JComboBox) e.getSource();