01: package net.sourceforge.squirrel_sql.plugins.graph;
02:
03: import net.sourceforge.squirrel_sql.client.session.ISession;
04: import net.sourceforge.squirrel_sql.fw.sql.ITableInfo;
05: import net.sourceforge.squirrel_sql.fw.util.StringManager;
06: import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
07:
08: import javax.swing.*;
09:
10: public class SqlScriptAcessor {
11: private static final StringManager s_stringMgr = StringManagerFactory
12: .getStringManager(SqlScriptAcessor.class);
13:
14: public static void scriptTablesToSQLEntryArea(ISession session,
15: ITableInfo[] tableInfos) {
16: ScriptInterface si = (ScriptInterface) session.getApplication()
17: .getPluginManager().bindExternalPluginService(
18: "sqlscript", ScriptInterface.class);
19: if (null == si) {
20: // i18n[graph.scriptPlugNeeded=Scripting is only available with the SQL Scripts Plugin.\nGet the plugin from www.squirrelsql.org. It's free.]
21: String msg = s_stringMgr
22: .getString("graph.scriptPlugNeeded");
23: JOptionPane.showMessageDialog(session.getApplication()
24: .getMainFrame(), msg);
25: return;
26: }
27:
28: si.scriptTablesToSQLEntryArea(session, tableInfos);
29: }
30: }
|