[Squirrel-sql-commits] sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel SQLPanel.
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Gerd W. <ger...@us...> - 2005-05-06 18:32:05
|
Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25015/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel Modified Files: SQLPanel.java SQLResultExecuterPanel.java Log Message: Fixed forever loop that might occur on databases that don't support multiple result sets. For example on the Intersystems Cache DB. Clean up. Index: SQLResultExecuterPanel.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SQLResultExecuterPanel.java 3 May 2005 17:37:43 -0000 1.3 --- SQLResultExecuterPanel.java 6 May 2005 18:31:02 -0000 1.4 *************** *** 1,923 **** ! package net.sourceforge.squirrel_sql.client.session.mainpanel; ! /* ! * Copyright (C) 2003-2004 Jason Height ! * jmh...@us... ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * [...1771 lines suppressed...] ! } ! } ! } ! ! private final static class ResultTabInfo ! { ! final ResultTab _tab; ! ResultFrame _resultFrame; ! ! ResultTabInfo(ResultTab tab) ! { ! if (tab == null) ! { ! throw new IllegalArgumentException("Null ResultTab passed"); ! } ! _tab = tab; ! } ! } } \ No newline at end of file Index: SQLPanel.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLPanel.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** SQLPanel.java 26 Apr 2005 00:53:58 -0000 1.27 --- SQLPanel.java 6 May 2005 18:31:02 -0000 1.28 *************** *** 76,86 **** import net.sourceforge.squirrel_sql.client.session.action.RedoAction; import net.sourceforge.squirrel_sql.client.session.action.UndoAction; ! import net.sourceforge.squirrel_sql.client.session.event.IResultTabListener; ! import net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener; ! import net.sourceforge.squirrel_sql.client.session.event.ISQLPanelListener; ! import net.sourceforge.squirrel_sql.client.session.event.ISQLResultExecuterTabListener; ! import net.sourceforge.squirrel_sql.client.session.event.ResultTabEvent; ! import net.sourceforge.squirrel_sql.client.session.event.SQLPanelEvent; ! import net.sourceforge.squirrel_sql.client.session.event.SQLResultExecuterTabEvent; import net.sourceforge.squirrel_sql.client.session.properties.SessionProperties; /** --- 76,80 ---- import net.sourceforge.squirrel_sql.client.session.action.RedoAction; import net.sourceforge.squirrel_sql.client.session.action.UndoAction; ! import net.sourceforge.squirrel_sql.client.session.event.*; import net.sourceforge.squirrel_sql.client.session.properties.SessionProperties; /** *************** *** 921,965 **** } ! protected List fireAllSQLToBeExecutedEvent(List sql) ! { ! // Guaranteed to be non-null. ! Object[] listeners = _listeners.getListenerList(); ! // Process the listeners last to first, notifying ! // those that are interested in this event. ! for (int i = listeners.length - 2; i >= 0; i -= 2) ! { ! if (listeners[i] == ISQLExecutionListener.class) ! { ! ((ISQLExecutionListener)listeners[i + 1]).allStatementsExecuting(sql); ! if (sql.size() == 0) ! { ! break; ! } ! } ! } ! return sql; ! } ! ! protected String fireSQLToBeExecutedEvent(String sql) ! { ! // Guaranteed to be non-null. ! Object[] listeners = _listeners.getListenerList(); ! // Process the listeners last to first, notifying ! // those that are interested in this event. ! for (int i = listeners.length - 2; i >= 0; i -= 2) ! { ! if (listeners[i] == ISQLExecutionListener.class) ! { ! sql = ((ISQLExecutionListener)listeners[i + 1]).statementExecuting(sql); ! if (sql == null) ! { ! break; ! } ! } ! } ! return sql; ! } ! ! protected void fireExecuterTabAdded(ISQLResultExecuter exec) { // Guaranteed to be non-null. --- 915,919 ---- } ! protected void fireExecuterTabAdded(ISQLResultExecuter exec) { // Guaranteed to be non-null. *************** *** 1558,1571 **** * for a SQLExecuterPanel and adding it to the SQL history. */ ! private class SQLExecutorHistoryListener implements ISQLExecutionListener { ! public void allStatementsExecuting(List sql) ! { ! } ! public String statementExecuting(String sql) ! { ! _panelAPI.addSQLToHistory(sql); ! return sql; ! } } } --- 1512,1521 ---- * for a SQLExecuterPanel and adding it to the SQL history. */ ! private class SQLExecutorHistoryListener extends SQLExecutionAdapter { ! public void statementExecuted(String sql) ! { ! _panelAPI.addSQLToHistory(sql); ! } } } |