[Squirrel-sql-commits] sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Gerd W. <ger...@us...> - 2004-12-01 22:12:07
|
Update of /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13642 Modified Files: ConvertToStringBufferAction.java EditExtrasPlugin.java EscapeDateController.java FormatSQLCommand.java InQuotesAction.java RemoveQuotesAction.java Added Files: FrameWorkAcessor.java Log Message: Made the plugin compilable for the time it takes to completely introduce the multible session windows framework. Index: InQuotesAction.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/InQuotesAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InQuotesAction.java 19 Oct 2003 01:13:15 -0000 1.2 --- InQuotesAction.java 1 Dec 2004 22:11:57 -0000 1.3 *************** *** 60,64 **** try { ! new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute(); } catch (Throwable ex) --- 60,65 ---- try { ! //new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute(); ! new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); } catch (Throwable ex) Index: EditExtrasPlugin.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/EditExtrasPlugin.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EditExtrasPlugin.java 16 May 2004 10:22:50 -0000 1.7 --- EditExtrasPlugin.java 1 Dec 2004 22:11:57 -0000 1.8 *************** *** 171,181 **** if (super.sessionStarted(session)) { ! session.getSQLPanelAPI(this).addSQLPanelListener(_lis); ! setupSQLEntryArea(session); ! // JeditSQLEntryPanel pnl = (JeditSQLEntryPanel)session.getPluginObject(this, JeditConstants.ISessionKeys.JEDIT_SQL_ENTRY_CONTROL); ! // JEditTextArea textArea = (JEditTextArea) ( (JScrollPane)pnl.getJComponent() ).getViewport().getView(); - ISQLPanelAPI api = session.getSQLPanelAPI(this); _searchAndReplaceKernelsBySessionID.put(session.getIdentifier(), new SearchAndReplaceKernel(api)); --- 171,183 ---- if (super.sessionStarted(session)) { ! //session.getSQLPanelAPI(this).addSQLPanelListener(_lis); ! FrameWorkAcessor.getSQLPanelAPI(session, this).addSQLPanelListener(_lis); ! setupSQLEntryArea(session); ! ! ! //ISQLPanelAPI api = session.getSQLPanelAPI(this); ! ISQLPanelAPI api = FrameWorkAcessor.getSQLPanelAPI(session, this); _searchAndReplaceKernelsBySessionID.put(session.getIdentifier(), new SearchAndReplaceKernel(api)); *************** *** 193,197 **** public void sessionEnding(ISession session) { ! session.getSQLPanelAPI(this).removeSQLPanelListener(_lis); _searchAndReplaceKernelsBySessionID.remove(session.getIdentifier()); super.sessionEnding(session); --- 195,202 ---- public void sessionEnding(ISession session) { ! //session.getSQLPanelAPI(this).removeSQLPanelListener(_lis); ! FrameWorkAcessor.getSQLPanelAPI(session, this).removeSQLPanelListener(_lis); ! ! _searchAndReplaceKernelsBySessionID.remove(session.getIdentifier()); super.sessionEnding(session); *************** *** 260,264 **** private void setupSQLEntryArea(ISession session) { ! ISQLPanelAPI api = session.getSQLPanelAPI(this); ActionCollection actions = getApplication().getActionCollection(); api.addToSQLEntryAreaMenu(actions.get(InQuotesAction.class)); --- 265,271 ---- private void setupSQLEntryArea(ISession session) { ! //ISQLPanelAPI api = session.getSQLPanelAPI(this); ! ISQLPanelAPI api = FrameWorkAcessor.getSQLPanelAPI(session, this); ! ActionCollection actions = getApplication().getActionCollection(); api.addToSQLEntryAreaMenu(actions.get(InQuotesAction.class)); Index: ConvertToStringBufferAction.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/ConvertToStringBufferAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConvertToStringBufferAction.java 19 Oct 2003 01:13:15 -0000 1.2 --- ConvertToStringBufferAction.java 1 Dec 2004 22:11:56 -0000 1.3 *************** *** 60,64 **** try { ! new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute(); } catch (Throwable ex) --- 60,66 ---- try { ! ! //new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute(); ! new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); } catch (Throwable ex) Index: RemoveQuotesAction.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveQuotesAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RemoveQuotesAction.java 19 Oct 2003 01:13:15 -0000 1.2 --- RemoveQuotesAction.java 1 Dec 2004 22:11:57 -0000 1.3 *************** *** 60,64 **** try { ! new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute(); } catch (Throwable ex) --- 60,65 ---- try { ! //new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute(); ! new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); } catch (Throwable ex) Index: FormatSQLCommand.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/FormatSQLCommand.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FormatSQLCommand.java 20 May 2003 20:53:52 -0000 1.2 --- FormatSQLCommand.java 1 Dec 2004 22:11:57 -0000 1.3 *************** *** 44,48 **** public void execute() throws BaseException { ! ISQLPanelAPI api = _session.getSQLPanelAPI(_plugin); String textToReformat = api.getSelectedSQLScript(); boolean isSelection = true; --- 44,50 ---- public void execute() throws BaseException { ! //ISQLPanelAPI api = _session.getSQLPanelAPI(_plugin); ! ISQLPanelAPI api = FrameWorkAcessor.getSQLPanelAPI(_session, _plugin); ! String textToReformat = api.getSelectedSQLScript(); boolean isSelection = true; Index: EscapeDateController.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/EscapeDateController.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EscapeDateController.java 16 May 2004 10:22:50 -0000 1.1 --- EscapeDateController.java 1 Dec 2004 22:11:57 -0000 1.2 *************** *** 1,6 **** package net.sourceforge.squirrel_sql.plugins.editextras; - import net.sourceforge.squirrel_sql.client.mainframe.MainFrame; import net.sourceforge.squirrel_sql.client.session.ISession; import net.sourceforge.squirrel_sql.fw.gui.GUIUtils; --- 1,6 ---- package net.sourceforge.squirrel_sql.plugins.editextras; import net.sourceforge.squirrel_sql.client.session.ISession; + import net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrame; import net.sourceforge.squirrel_sql.fw.gui.GUIUtils; --- NEW FILE: FrameWorkAcessor.java --- package net.sourceforge.squirrel_sql.plugins.editextras; import net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI; import net.sourceforge.squirrel_sql.client.session.ISQLPanelAPI; import net.sourceforge.squirrel_sql.client.session.ISession; /** * This class was introduced to make the plugin compilable for the time it takes * to completely introduce the multible session windows framework. * It may be removed after that. */ public class FrameWorkAcessor { public static ISQLPanelAPI getSQLPanelAPI(ISession session, EditExtrasPlugin plugin) { // _session.getSQLPanelAPI(_plugin) return session.getSessionSheet().getSQLPaneAPI(); } public static IObjectTreeAPI getObjectTreeAPI(ISession session, EditExtrasPlugin plugin) { //IObjectTreeAPI api = session.getObjectTreeAPI(this); return session.getSessionSheet().getObjectTreePanel(); } } |