public override string[] Complete(Engine e, string text) { return e.Completer.FilenameCompleter (text); }
/* override this to provide command specific completion */ public virtual string[] Complete(Engine e, string text) { if (text.StartsWith ("-")) { /* do our super cool argument completion on the command's * properties, if there are any. */ return e.Completer.ArgumentCompleter (GetType(), text); } else { /* otherwise punt */ return e.Completer.NoopCompleter (text); } }
public override string[] Complete(Engine e, string text) { // this doesn't quite work yet. in the end it // should allow completion of subcommand arguments, // but for now it just offers completion of the // subcommand. if (Args != null && Args.Count > 0) { /* the user tabbed after the space in the * arguments. the first arg is meant to * identify the subcommand, and the next * args are the subcommand arguments. so * push this off to the subcommand's * completer. */ Type subcommand_type = (Type)subcommand_type_hash[(string) Args[0]]; if (subcommand_type == null) { return e.Completer.NoopCompleter (text); } else { /* copied from above */ subcommand = (DebuggerCommand) Activator.CreateInstance (subcommand_type); ArrayList new_args = new ArrayList (); for (int i = 1; i < Args.Count; i++) new_args.Add (Args [i]); subcommand.Args = new_args; return subcommand.Complete (e, text); } } if (subcommand_type_hash.Count == 0) { return e.Completer.NoopCompleter (text); } else { string[] haystack = new string[subcommand_type_hash.Count]; subcommand_type_hash.Keys.CopyTo (haystack, 0); return e.Completer.StringsCompleter (haystack, text); } }
public override string[] Complete(Engine e, string text) { DebuggerEngine engine = (DebuggerEngine) e; return e.Completer.StringsCompleter (engine.Interpreter.GetStyleNames(), text); }
public override string[] Complete(Engine e, string text) { if (text.StartsWith ("-")) { return e.Completer.ArgumentCompleter (GetType(), text); } else { /* attempt filename completion */ return e.Completer.FilenameCompleter (text); } }
public override string[] Complete(Engine e, string text) { /* attempt filename completion */ return e.Completer.FilenameCompleter (text); }
public override string[] Complete(Engine e, string text) { /* arguments to the "help" command are commands * themselves, so complete against them. */ return e.Completer.CommandCompleter (text); }
public Completer(Engine engine) { this.engine = engine; }
// // Command Operations // public LineParser(Engine e) { engine = e; sb = new StringBuilder (); }