org.objectweb.jac.aspects.gui.swing
Class DefaultCompletionEngine
java.lang.Object
org.objectweb.jac.aspects.gui.swing.CompletionEngine
org.objectweb.jac.aspects.gui.swing.DefaultCompletionEngine
- Direct Known Subclasses:
- AccCompletionEngine
- public class DefaultCompletionEngine
- extends CompletionEngine
This class implements a default completion engines for editors. It
is non contextual (i.e. the proposed completions are always the
same and are the ones defined by addBaseWord
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCompletionEngine
public DefaultCompletionEngine()
getContextualChoices
public List getContextualChoices(String text,
int position,
String writtenText)
- In the default completion engine, this method only returns base
words (i.e. non-contextual words).
- Specified by:
getContextualChoices
in class CompletionEngine
- Parameters:
text
- the editor's full textposition
- the cursor positionwrittenText
- the already written text
- Returns:
- a list of strings which must not contain duplicates
isAutomaticCompletionChar
public boolean isAutomaticCompletionChar(char c)
- This method always returns false (no automatic completion is
supported).
- Specified by:
isAutomaticCompletionChar
in class CompletionEngine
runAutomaticCompletion
public void runAutomaticCompletion(SHEditor editor,
String text,
int position,
char c)
- Do nothing (anyway it is never called because
isAutomaticCompletionChar
always returns
false).
- Specified by:
runAutomaticCompletion
in class CompletionEngine