Microsoft.R.Editor.Document.REditorDocument.REditorDocument C# (CSharp) Method

REditorDocument() public method

public REditorDocument ( ITextBuffer textBuffer, ICoreShell shell ) : System
textBuffer ITextBuffer
shell ICoreShell
return System
        public REditorDocument(ITextBuffer textBuffer, ICoreShell shell) {
            _shell = shell;
            _textDocumentFactoryService = _shell.ExportProvider.GetExportedValue<ITextDocumentFactoryService>();
            _textDocumentFactoryService.TextDocumentDisposed += OnTextDocumentDisposed;

            TextBuffer = textBuffer;
            IsClosed = false;

            ServiceManager.AddService(this, TextBuffer, shell);
            var clh = ServiceManager.GetService<IContainedLanguageHost>(textBuffer);

            _editorTree = new EditorTree(textBuffer, shell, new ExpressionTermFilter(clh));
            if (REditorSettings.SyntaxCheckInRepl) {
                _validator = new TreeValidator(EditorTree, shell);
            }

            _editorTree.Build();
        }
        #endregion