public PromptRecognizer(AbstractTerminal term)
        {
            _terminal      = term;
            _commandBuffer = new StringBuilder();
            ITerminalSettings ts = term.TerminalHost.TerminalSettings;

            ts.AddListener(this);
            _promptExpression = new Regex(ts.ShellScheme.PromptExpression, RegexOptions.Compiled); //これはシェルにより可変
            _listeners        = new List <IPromptProcessor>();
        }
Beispiel #2
0
 public void Attach(ITerminalSettings ts)
 {
     if (_terminalSettings != null)
     {
         _terminalSettings.RemoveListener(this);
     }
     _terminalSettings = ts;
     _terminalSettings.AddListener(this);
     _toolBar.RefreshComponent(_parent);
 }
        public PromptRecognizer(AbstractTerminal term)
        {
            _terminal      = term;
            _commandBuffer = new StringBuilder();
            ITerminalSettings ts = term.TerminalHost.TerminalSettings;

            ts.AddListener(this);
            _promptExpression = new Regex(ts.ShellScheme.PromptExpression, RegexOptions.Compiled); //これはシェルにより可変
            _listeners        = new List <IPromptProcessor>();
            _lineCache        = new LineCache(PromptRecognizerPreferences.Instance.PromptSearchMaxLines);
            _lastCachedLineID = -1;
        }
Beispiel #4
0
 public void Attach(ITerminalSettings ts) {
     if (_terminalSettings != null)
         _terminalSettings.RemoveListener(this);
     _terminalSettings = ts;
     _terminalSettings.AddListener(this);
     _toolBar.RefreshComponent(_parent);
 }