This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
tab completion
- From: Stan Cox <scox at redhat dot com>
- To: Frysk List <frysk at sourceware dot org>
- Date: Wed, 08 Aug 2007 15:59:03 -0400
- Subject: tab completion
Tab completion is a feature of jline. fhpd.java sets it up by
defining a class FhpdCompletor which defines CLI.complete as the
completor. This method uses heuristics to determine what is being
completed. If the fhpd request line doesn't contain spaces then it is
assumed that request names are being completed. This is done by
calling candidates.add to add each request names that match the
input thus far. Then complete returns the position in the input line
where completion will continue to jline. If request names are not being
completed then debugInfo.complete is called as the completor. This
method interrogates the debuginfo to find candidate names.
DwarfDie.getScopeVarNames does most of the work of finding candidate
names. candidates.add is called to add matching names. Structure
members are handled specially by getScopeVarNames by returning the
structure members.