|
From: SVN by r. <sv...@ca...> - 2008-08-06 14:23:37
|
Author: roy
Date: 2008-08-06 16:23:23 +0200 (Wed, 06 Aug 2008)
New Revision: 283
Modified:
src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java
src/main/java/nl/improved/sqlclient/jcurses/SQLShellWindow.java
Log:
small code cleanup
Modified: src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java
===================================================================
--- src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-05 12:16:24 UTC (rev 282)
+++ src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-06 14:23:23 UTC (rev 283)
@@ -77,7 +77,7 @@
/**
* The current command lines.
*/
- protected SQLCommand commandLines;
+ private SQLCommand commandLines;
/**
* All commands in history.
*/
@@ -518,6 +518,15 @@
return commandLines;
}
+ protected List<SQLCommand> getUnprocessedCommands() {
+ List<SQLCommand> returnValue = new ArrayList<SQLCommand>();
+ Iterator<CommandInfo> i = commandQueue.iterator();
+ while (i.hasNext()) {
+ returnValue.add(i.next().cmd);
+ }
+ return returnValue;
+ }
+
/**
* Add a new line to the command lines buffer.
*/
Modified: src/main/java/nl/improved/sqlclient/jcurses/SQLShellWindow.java
===================================================================
--- src/main/java/nl/improved/sqlclient/jcurses/SQLShellWindow.java 2008-08-05 12:16:24 UTC (rev 282)
+++ src/main/java/nl/improved/sqlclient/jcurses/SQLShellWindow.java 2008-08-06 14:23:23 UTC (rev 283)
@@ -39,6 +39,7 @@
import nl.improved.sqlclient.InputKey;
import nl.improved.sqlclient.Point;
import nl.improved.sqlclient.Screen;
+import nl.improved.sqlclient.SQLCommand;
/**
* SQLShell window based on the jcurses library.
@@ -230,6 +231,7 @@
tmpList.addAll(screenBuffer);
//add prompt
+ SQLCommand commandLines = getCommand();
List<? extends CharSequence> currentLines = commandLines.getLines();
for (int i = 0; i < currentLines.size(); i++) {
if (i == 0 && screen.getShowPrompt()) {
|