--- a
+++ b/work/jcomplete/doc/readme.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">
+	<TITLE>Documentation</TITLE>
+	<META NAME="GENERATOR" CONTENT="StarOffice 6.0  (Linux)">
+	<META NAME="CREATED" CONTENT="20021014;22213400">
+	<META NAME="CHANGEDBY" CONTENT="Christian Sell">
+	<META NAME="CHANGED" CONTENT="20021014;22213400">
+	<STYLE>
+	<!--
+		@page { margin: 2cm }
+		H3 { margin-bottom: 0.21cm }
+		H3.western { font-family: "Albany", sans-serif }
+		H2 { margin-bottom: 0.21cm }
+		H2.western { font-family: "Albany", sans-serif; font-size: 14pt; font-style: italic }
+		H2.cjk { font-size: 14pt; font-style: italic }
+		H2.ctl { font-size: 14pt; font-style: italic }
+		H1 { margin-bottom: 0.21cm }
+		H1.western { font-family: "Albany", sans-serif; font-size: 16pt }
+		H1.cjk { font-size: 16pt }
+		H1.ctl { font-size: 16pt }
+		P { margin-bottom: 0.21cm }
+	-->
+	</STYLE>
+</HEAD>
+<BODY LANG="de-DE">
+<H1 CLASS="western">Documentation</H1>
+<H2 CLASS="western">Introduction</H2>
+<P STYLE="margin-bottom: 0cm">this project consists of 3
+sub-packages:</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<OL>
+	<LI><P STYLE="margin-bottom: 0cm"><B>jcoco</B> - an adpated Java
+	version of the COCO/R parser generator</P>
+	<LI><P STYLE="margin-bottom: 0cm"><B>jcomplete</B> - an SQL code
+	completion engine built on top of a generated parser. The completion
+	engine is designed such that at a later point it can be refactored
+	to support other languages as well.</P>
+	<LI><P STYLE="margin-bottom: 0cm"><B>jcomplete-plugin</B> - a plugin
+	for SQuirrel-SQL, which adds the completion facility to the default
+	SQL entry panel</P>
+</OL>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<H2 CLASS="western">Jcoco</H2>
+<P STYLE="margin-bottom: 0cm">COCO/R is a parser generator created by
+H.M&ouml;ssenb&ouml;ck with amendments by P.Terry. JCoco is an
+adaptation which adds more needed functionality. In particular, these
+are:</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<UL>
+	<LI><P STYLE="margin-bottom: 0cm">specify target directory</P>
+	<LI><P STYLE="margin-bottom: 0cm">specify target package
+	(directories are created under the target directory)</P>
+	<LI><P STYLE="margin-bottom: 0cm">specify target import statements
+	for inclusion in the parser</P>
+	<LI><P STYLE="margin-bottom: 0cm">generate static (all static
+	methods) or instance-based parser</P>
+</UL>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm">There is also an Ant task to invoke
+JCoco from inside Ant build scripts.</P>
+<H2 CLASS="western">Jcomplete</H2>
+<P STYLE="margin-bottom: 0cm">This is the completion engine proper.
+The underlying SQL parser has been generated by JCoco, the
+specification file can be found in the atg</P>
+<P STYLE="margin-bottom: 0cm">directory (SquirrelSQL.atg, along with
+some leftover files).</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm">The completion engine is generic enough
+to be pluggable into any JTextComponent (and beyond that).</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm">JComplete currently supports all DML
+statements (SELECT, INSERT, UPDATE, DELETE). There is a test program
+which can be invoked through the Ant script (target testUI). It shows
+a simple text input pane with a hard-coded underlying DB schema
+(there is no DB connection). Dont worry about error messages
+appearing in the lower pane &ndash; this is only for test purposes. A
+description of the code completion features is given with the
+description of the plugin below.</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm">In case you're interested: they appear
+because the parser, while it does work incrementally when typing
+forward, is not able to backtrack whenever text is deleted or
+inserted into the middle of the existing text. In that case, the
+parser is terminated and restarted. The terminating involves
+inserting an EOF, which makes the parser balk about the invalid
+statement before it terminates. The parser does run in a separate
+thread.</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<H2 CLASS="western">Jcomplete plugin</H2>
+<P STYLE="margin-bottom: 0cm">The jcomplete plugin provides an
+integration with Squirrel-SQL which enhances the default SQL entry
+panel with code completion features.</P>
+<H3 CLASS="western">Using code completion</H3>
+<P>Code completion is available in the context of any DML statement
+(not DDL). Completion is offered for schema elements (tables and
+columns) &ndash; not for syntax elements (we assume you know those
+well enough). This means that while writing an SQL statement, at any
+point where a column name or table name needs to be inserted, the
+completion can be invoked through an assigned key code (Ctrl-Space by
+default). It will then show a list of available items which can be
+inserted into the text at the current cursor position. Depending on
+the context, the completion will attempt to preserve alias
+assignments and offer sensible selections. There are 2 displac
+elements:</P>
+<UL>
+	<LI><P>a table/column chooser will be shown if a unique table
+	assignement does not exist in the current context. This is the case,
+	for example, at the beginning of a SELECT statement. An alias can be
+	assigned. If an alias already exists (e.g., the cursor is positioned
+	right after  the sequence &bdquo;select a.&ldquo;), the alias will
+	be preserved. If a table is assigned to an alias, the table will be
+	available with the alias later in the FROM clause.</P>
+	<LI><P>A column list will be shown if a unique table assignment
+	exists in the current statement context. For example, after the
+	sequence &bdquo;insert into table_a (&bdquo;  the column list will
+	show all columns from table_a.</P>
+</UL>
+<P STYLE="margin-bottom: 0cm">Code completion can also be invoked
+withn already written text, i.e. you can move back into the statement
+and change it, using code completion features. For example, if you
+position into the follwing statement &bdquo;select a.[cursor
+here]name, a.number from table_a where a.number = 22&ldquo;, you can
+invoke completion to get a list of all columns from table_a. If you
+choose one, its name will be substituted for the column at the
+current position.</P>
+<P STYLE="margin-bottom: 0cm">In most places, you can select several
+items from the list. The items will be inserted into the text
+separated by appropriate separators.</P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<H3 CLASS="western">Installing the plugin</H3>
+<P STYLE="margin-bottom: 0cm">The plugin is currently not integrated
+with the Squirrel build system. I have provided a plugin_build.xml
+file which can be used to build the plugin from the current location.
+The plugin files will then appear int the same directory as during
+the build of other plugins. To install, copy the relevant files into
+your installation.</P>
+<P STYLE="margin-bottom: 0cm"><I>Note that the completion plugin
+cannot be run along with the Jedit plugin, as both install their own
+SQL entry panel.</I></P>
+<P STYLE="margin-bottom: 0cm"><BR>
+</P>
+<P STYLE="margin-bottom: 0cm">Have fun,</P>
+<P STYLE="margin-bottom: 0cm">Christian Sell</P>
+</BODY>
+</HTML>