protected override void ReParseImpl()
        {
            try
            {
                Stopwatch stopwatch = Stopwatch.StartNew();

                ITextSnapshot snapshot = TextBuffer.CurrentSnapshot;
                ITextDocument textDocument;
                if (!TextDocumentFactoryService.TryGetTextDocument(DocumentBuffer, out textDocument))
                {
                    textDocument = null;
                }

                IEnumerable <HunkRangeInfo> diff;
                if (textDocument != null)
                {
                    diff = _commands.GetGitDiffFor(textDocument, snapshot);
                }
                else
                {
                    diff = Enumerable.Empty <HunkRangeInfo>();
                }

                DiffParseResultEventArgs result = new DiffParseResultEventArgs(snapshot, stopwatch.Elapsed, diff.ToList());
                OnParseComplete(result);
            }
            catch (InvalidOperationException)
            {
                base.MarkDirty(true);
                throw;
            }
        }
        protected override void ReParseImpl()
        {
            try
            {
                Stopwatch stopwatch = Stopwatch.StartNew();

                ITextSnapshot snapshot = TextBuffer.CurrentSnapshot;
                ITextDocument textDocument;
                if (!TextDocumentFactoryService.TryGetTextDocument(TextBuffer, out textDocument))
                    textDocument = null;

                IEnumerable<HunkRangeInfo> diff;
                if (textDocument != null)
                    diff = _commands.GetGitDiffFor(textDocument, snapshot);
                else
                    diff = Enumerable.Empty<HunkRangeInfo>();

                DiffParseResultEventArgs result = new DiffParseResultEventArgs(snapshot, stopwatch.Elapsed, diff.ToList());
                OnParseComplete(result);
            }
            catch (InvalidOperationException)
            {
                base.MarkDirty(true);
                throw;
            }
        }