Forge - Shell API 1.2.0.Final

org.jboss.forge.shell.completer
Class SimpleTokenCompleter

java.lang.Object
  extended by org.jboss.forge.shell.completer.SimpleTokenCompleter
All Implemented Interfaces:
CommandCompleter

public abstract class SimpleTokenCompleter
extends Object
implements CommandCompleter

The simplest possible command option completer. Matching of tokens is handled automatically based on comparing the partial token against the beginning of each candidate, but also provides the least control over how completion occurs.

Author:
Lincoln Baxter, III

Constructor Summary
SimpleTokenCompleter()
           
 
Method Summary
 void complete(CommandCompleterState state)
           
abstract  Iterable<?> getCompletionTokens()
          Return a list of tokens to be considered as possible completions for the current input buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTokenCompleter

public SimpleTokenCompleter()
Method Detail

getCompletionTokens

public abstract Iterable<?> getCompletionTokens()
Return a list of tokens to be considered as possible completions for the current input buffer. Typically, this should be a list of all possible candidates, but might vary depending on current state. If returning Objects, ensure that their {Object.toString() method is appropriately overloaded; the value returned will be used in completion.


complete

public void complete(CommandCompleterState state)
Specified by:
complete in interface CommandCompleter

Forge - Shell API 1.2.0.Final

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.