protected void CompleteInternal(CompletionContext context, string key)
        {
            string insertString;

            if (this.outputVisitor != null) {
                PrimitiveExpression pre = new PrimitiveExpression(key, key);
                pre.AcceptVisitor(this.outputVisitor, null);
                insertString = this.outputVisitor.Text;
            } else {
                insertString = key;
            }

            context.Editor.Document.Replace(context.StartOffset, context.Length, insertString);
            context.EndOffset = context.StartOffset + insertString.Length;
        }
		/// <summary>
		/// Insert the element represented by the completion data into the text
		/// editor.
		/// </summary>
		/// <param name="textArea">TextArea to insert the completion data in.</param>
		/// <param name="ch">Character that should be inserted after the completion data.
		/// \0 when no character should be inserted.</param>
		/// <returns>Returns true when the insert action has processed the character
		/// <paramref name="ch"/>; false when the character was not processed.</returns>
		public override bool InsertAction(TextArea textArea, char ch)
		{
			string insertString;
			
			if (this.outputVisitor != null) {
				PrimitiveExpression pre = new PrimitiveExpression(this.Text, this.Text);
				pre.AcceptVisitor(this.outputVisitor, null);
				insertString = this.outputVisitor.Text;
			} else {
				insertString = this.Text;
			}
			
			textArea.InsertString(insertString);
			if (ch == insertString[insertString.Length - 1]) {
				return true;
			}
			return false;
		}