public void execute() {
if (session == null) {
return;
}
ISQLEntryPanel sqlEntryPanel;
if(session.getActiveSessionWindow() instanceof SessionInternalFrame)
{
sqlEntryPanel = ((SessionInternalFrame)session.getActiveSessionWindow()).getSQLPanelAPI().getSQLEntryPanel();
}
else if(session.getActiveSessionWindow() instanceof SQLInternalFrame)
{
sqlEntryPanel = ((SQLInternalFrame)session.getActiveSessionWindow()).getSQLPanelAPI().getSQLEntryPanel();
}
else
{
return;
}
String sql = sqlEntryPanel.getSQLToBeExecuted();
if(null == sql || 0 == sql.trim().length())
{
// i18n[sqlbookmark.noAdd=No text to be added.]
JOptionPane.showMessageDialog(frame, s_stringMgr.getString("sqlbookmark.noAdd"));
return;