public StyleBase GetStyle(string name) { StyleBase style = (StyleBase)styles [name]; if (style == null) { throw new ScriptingException( "No such user interface: `{0}'", name); } return(style); }
public Interpreter(bool is_interactive, DebuggerConfiguration config, DebuggerOptions options) { this.config = config; this.is_interactive = is_interactive; this.is_script = options.IsScript; this.parser = new ExpressionParser (this); this.session = new DebuggerSession (config, options, "main", parser); this.engine = new DebuggerEngine (this); parser.Session = session; source_factory = new SourceFileFactory (); interrupt_event = new ManualResetEvent (false); process_event = new ManualResetEvent (false); styles = new Hashtable (); styles.Add ("cli", new StyleCLI (this)); styles.Add ("emacs", new StyleEmacs (this)); current_style = (StyleBase) styles ["cli"]; }
public Interpreter(bool is_interactive, DebuggerConfiguration config, DebuggerOptions options) { this.config = config; this.is_interactive = is_interactive; this.is_script = options.IsScript; this.parser = new ExpressionParser(this); this.session = new DebuggerSession(config, options, "main", parser); this.engine = new DebuggerEngine(this); parser.Session = session; source_factory = new SourceFileFactory(); interrupt_event = new ManualResetEvent(false); process_event = new ManualResetEvent(false); styles = new Hashtable(); styles.Add("cli", new StyleCLI(this)); styles.Add("emacs", new StyleEmacs(this)); current_style = (StyleBase)styles ["cli"]; }
protected override bool DoResolve(ScriptingContext context) { if (Argument == "") { context.Print ("Invalid argument: Need the name of the style"); return false; } style = context.Interpreter.GetStyle (Argument); return true; }