lexx.autocomplete.java
Class JavaAutoListener

java.lang.Object
  |
  +--lexx.autocomplete.AutoCompleteListener
        |
        +--lexx.autocomplete.java.JavaAutoListener
All Implemented Interfaces:
javax.swing.event.DocumentListener, java.util.EventListener

public final class JavaAutoListener
extends AutoCompleteListener

Performs autocompletion once an AST has been produced

This class becomes activated when a DocumentEvent is called

Copyright (c) 2002-2003

Since:
19/03/2003
Version:
1.0
Author:
Mohammed Imran

Constructor Summary
JavaAutoListener(EditorPanel editPane, JavaParserListener lexxDoc)
          Enables autocompletion
 
Method Summary
 java.util.List getCurrentDisplayedList()
          Used in automated testing
 void turnOffPopup()
          Used in automated testing to turn off the popup
 void update(javax.swing.event.DocumentEvent e, boolean wasInserted)
          This method is where you take the DocumentEvent and check if autocompletion can occur
 
Methods inherited from class lexx.autocomplete.AutoCompleteListener
changedUpdate, insertUpdate, removeUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaAutoListener

public JavaAutoListener(EditorPanel editPane,
                        JavaParserListener lexxDoc)
Enables autocompletion

Parameters:
editPane - required to get the text from the editor
lexxDoc - required to get the AST
Method Detail

turnOffPopup

public void turnOffPopup()
Used in automated testing to turn off the popup


getCurrentDisplayedList

public java.util.List getCurrentDisplayedList()
Used in automated testing

Specified by:
getCurrentDisplayedList in class AutoCompleteListener
Returns:
the display of the pop

update

public final void update(javax.swing.event.DocumentEvent e,
                         boolean wasInserted)
This method is where you take the DocumentEvent and check if autocompletion can occur

Specified by:
update in class AutoCompleteListener
Parameters:
e - when user changes the text
wasInserted - if the user inserted text into the source code