Exemple #1
0
 public IntelliSenseContext(IntelliSense owner)
 {
     _owner      = owner;
     _candidates = new IntelliSenseCandidateList();
     _buffer     = new StringBuilder();
     _charQueue  = new CharQueue();
 }
Exemple #2
0
        public AbstractTerminal(TerminalInitializeInfo info)
        {
            TerminalEmulatorPlugin.Instance.LaterInitialize();

            _session = info.Session;

            //_invalidateParam = new InvalidateParam();
            _document = new TerminalDocument(info.InitialWidth, info.InitialHeight);
            _document.SetOwner(_session.ISession);
            _afterExitLockActions = new List <AfterExitLockDelegate>();

            _encodingProfile         = EncodingProfile.Create(info.Session.TerminalSettings.Encoding);
            _decoder                 = new ISO2022CharDecoder(this, _encodingProfile);
            _unicodeCharConverter    = _encodingProfile.CreateUnicodeCharConverter();
            _terminalMode            = TerminalMode.Normal;
            _currentdecoration       = TextDecoration.Default;
            _manipulator             = new GLineManipulator();
            _scrollBarValues         = new ScrollBarValues();
            _logService              = new LogService(info.TerminalParameter, _session.TerminalSettings);
            _promptRecognizer        = new PromptRecognizer(this);
            _intelliSense            = new IntelliSense(this);
            _commandResultRecognizer = new PopupStyleCommandResultRecognizer(this);

            if (info.Session.TerminalSettings.LogSettings != null)
            {
                _logService.ApplyLogSettings(_session.TerminalSettings.LogSettings, false);
            }

            //event handlers
            ITerminalSettings ts = info.Session.TerminalSettings;

            ts.ChangeEncoding += delegate(EncodingType t) {
                this.Reset();
            };
            ts.ChangeRenderProfile += delegate(RenderProfile prof) {
                TerminalControl tc = _session.TerminalControl;
                if (tc != null)
                {
                    tc.ApplyRenderProfile(prof);
                }
            };
        }