Exemplo n.º 1
0
        public REditorDocument(ITextBuffer textBuffer)
        {
            _textDocumentFactoryService = EditorShell.Current.ExportProvider.GetExportedValue <ITextDocumentFactoryService>();
            _textDocumentFactoryService.TextDocumentDisposed += OnTextDocumentDisposed;

            this.TextBuffer = textBuffer;
            IsClosed        = false;

            ServiceManager.AddService <REditorDocument>(this, TextBuffer);

            _editorTree = new EditorTree(textBuffer);
            if (REditorSettings.SyntaxCheckInRepl)
            {
                _validator = new TreeValidator(this.EditorTree);
            }

            _editorTree.Build();
            RCompletionEngine.Initialize();
        }
Exemplo n.º 2
0
        public REditorDocument(ITextBuffer textBuffer)
        {
            EditorShell.Current.CompositionService.SatisfyImportsOnce(this);

            this.TextBuffer = textBuffer;

            IsClosed = false;
            TextDocumentFactoryService.TextDocumentDisposed += OnTextDocumentDisposed;

            ServiceManager.AddService <REditorDocument>(this, TextBuffer);

            _editorTree = new EditorTree(textBuffer);
            if (REditorSettings.SyntaxCheckInRepl)
            {
                _validator = new TreeValidator(this.EditorTree);
            }

            _editorTree.Build();

            RCompletionEngine.Initialize();
        }