|
From: SVN by r. <sv...@ca...> - 2008-08-19 11:10:10
|
Author: roy
Date: 2008-08-19 13:10:00 +0200 (Tue, 19 Aug 2008)
New Revision: 289
Modified:
src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java
Log:
add tab completion to read command
Modified: src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java
===================================================================
--- src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-19 11:05:39 UTC (rev 288)
+++ src/main/java/nl/improved/sqlclient/AbstractSQLShellWindow.java 2008-08-19 11:10:00 UTC (rev 289)
@@ -1873,8 +1873,10 @@
*/
@Override
public TabCompletionInfo getTabCompletionInfo(SQLCommand command, Point commandPoint) {
- return null; // TODO
+ String fn = command.getCommandString().substring("read".length()).trim();
+ return getFileNameTabCompletionInfo(fn);
}
+
@Override
public CharSequence getHelp() {
return "filename: read dump file from filename\n"+
@@ -2119,11 +2121,18 @@
}
+ /**
+ * The key action interface.
+ * Implement this interface for handling key actions.
+ */
private interface KeyAction {
void execute();
CharSequence getHelp();
}
+ /**
+ * Simple class that holds the SQLCommand and it's matching Command information.
+ */
private class CommandInfo {
private SQLCommand sql;
private Command cmd;
|