private void TextDocumentFactoryServiceOnTextDocumentDisposed(object sender, TextDocumentEventArgs textDocumentEventArgs)
 {
     if (textDocumentEventArgs.TextDocument != null)
     {
         _fileRegistrationRequestService.UnregisterTextDocument(textDocumentEventArgs.TextDocument);
     }
 }
        private void TextDocumentFactoryServiceOnTextDocumentDisposed(object sender, TextDocumentEventArgs args)
        {
            var document = args.TextDocument;

            if (FullPath.IsValid(document.FilePath))
            {
                var path = new FullPath(document.FilePath);
                _openDocuments.Remove(path);
            }
        }
        private void TextDocumentFactoryServiceOnTextDocumentCreated(object sender, TextDocumentEventArgs args)
        {
            var document = args.TextDocument;

            document.FileActionOccurred += TextDocumentOnFileActionOccurred;
            if (FullPath.IsValid(document.FilePath))
            {
                var path = new FullPath(document.FilePath);
                _openDocuments[path] = document;
            }
        }
 private void TextDocumentFactoryServiceOnTextDocumentCreated(object sender, TextDocumentEventArgs textDocumentEventArgs)
 {
     if (textDocumentEventArgs.TextDocument != null)
     {
         _fileRegistrationRequestService.RegisterTextDocument(textDocumentEventArgs.TextDocument);
         textDocumentEventArgs.TextDocument.FileActionOccurred += (o, args) => {
             if (args.FileActionType.HasFlag(FileActionTypes.DocumentRenamed))
             {
                 var document = (ITextDocument)o;
                 _fileRegistrationRequestService.RegisterFile(args.FilePath);
                 _fileRegistrationRequestService.UnregisterFile(document.FilePath);
             }
         };
     }
 }
Exemple #5
0
 protected virtual void OnTextDocumentClosed(TextDocumentEventArgs e)
 {
     Logger.WrapActionInvocation(() => { TextDocumentClosed?.Invoke(this, e); });
 }
Exemple #6
0
 private void TextDocumentFactoryServiceOnTextDocumentOpened(object sender, TextDocumentEventArgs textDocumentEventArgs)
 {
     _fileRegistrationRequestService.RegisterTextDocument(textDocumentEventArgs.TextDocument);
 }