示例#1
0
 public override string[] Complete(Engine e, string text)
 {
     return e.Completer.FilenameCompleter (text);
 }
示例#2
0
 /* 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);
     }
 }
示例#3
0
        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);
            }
        }
示例#4
0
            public override string[] Complete(Engine e, string text)
            {
                DebuggerEngine engine = (DebuggerEngine) e;

                return e.Completer.StringsCompleter (engine.Interpreter.GetStyleNames(), text);
            }
示例#5
0
 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);
     }
 }
示例#6
0
 public override string[] Complete(Engine e, string text)
 {
     /* attempt filename completion */
     return e.Completer.FilenameCompleter (text);
 }
示例#7
0
 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);
 }
示例#8
0
 public Completer(Engine engine)
 {
     this.engine = engine;
 }
示例#9
0
文件: CL.cs 项目: baulig/debugger
 //
 // Command Operations
 //
 public LineParser(Engine e)
 {
     engine = e;
     sb = new StringBuilder ();
 }