private void TextDocumentFactoryServiceOnTextDocumentDisposed(object sender, TextDocumentEventArgs textDocumentEventArgs)
 {
     if (textDocumentEventArgs.TextDocument != null)
     {
         _fileRegistrationRequestService.UnregisterTextDocument(textDocumentEventArgs.TextDocument);
     }
 }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
             }
         };
     }
 }
Ejemplo n.º 5
0
 protected virtual void OnTextDocumentClosed(TextDocumentEventArgs e)
 {
     Logger.WrapActionInvocation(() => { TextDocumentClosed?.Invoke(this, e); });
 }
Ejemplo n.º 6
0
 private void TextDocumentFactoryServiceOnTextDocumentOpened(object sender, TextDocumentEventArgs textDocumentEventArgs)
 {
     _fileRegistrationRequestService.RegisterTextDocument(textDocumentEventArgs.TextDocument);
 }