PluginSessionCallback ret = new PluginSessionCallback()
{
public void sqlInternalFrameOpened(SQLInternalFrame sqlInternalFrame, ISession sess)
{
ActionCollection coll = sess.getApplication().getActionCollection();
sqlInternalFrame.addSeparatorToToolbar();
sqlInternalFrame.addToToolbar(coll.get(CreateTableOfCurrentSQLAction.class));
sqlInternalFrame.addToToolsPopUp("sql2table", coll.get(CreateTableOfCurrentSQLAction.class));
sqlInternalFrame.addToToolsPopUp("sql2ins", coll.get(CreateDataScriptOfCurrentSQLAction.class));
}
public void objectTreeInternalFrameOpened(ObjectTreeInternalFrame objectTreeInternalFrame,
ISession sess)
{
ActionCollection coll = sess.getApplication().getActionCollection();
objectTreeInternalFrame.getObjectTreeAPI().addToPopup(
DatabaseObjectType.TABLE, coll.get(CreateTableScriptAction.class));
objectTreeInternalFrame.getObjectTreeAPI().addToPopup(
DatabaseObjectType.TABLE, coll.get(CreateSelectScriptAction.class));
objectTreeInternalFrame.getObjectTreeAPI().addToPopup(
DatabaseObjectType.TABLE, coll.get(DropTableScriptAction.class));
objectTreeInternalFrame.getObjectTreeAPI().addToPopup(
DatabaseObjectType.TABLE, coll.get(CreateDataScriptAction.class));
objectTreeInternalFrame.getObjectTreeAPI().addToPopup(
DatabaseObjectType.TABLE, coll.get(CreateTemplateDataScriptAction.class));
}
};
return ret;
}