// Internal for testing
        internal void StartParser()
        {
            _dispatcher.AssertForegroundThread();

            // Make sure any tests use the real thing or a good mock. These tests can cause failures
            // that are hard to understand when this throws.
            Debug.Assert(_documentTracker.IsSupportedProject);
            Debug.Assert(_documentTracker.ProjectSnapshot != null);

            _projectEngine = _projectEngineFactory.Create(_documentTracker.ProjectSnapshot, ConfigureProjectEngine);

            Debug.Assert(_projectEngine != null);
            Debug.Assert(_projectEngine.Engine != null);
            Debug.Assert(_projectEngine.FileSystem != null);

            var projectDirectory = Path.GetDirectoryName(_documentTracker.ProjectPath);

            _parser = new BackgroundParser(_projectEngine, FilePath, projectDirectory);
            _parser.ResultsReady += OnResultsReady;
            _parser.Start();

            TextBuffer.Changed += TextBuffer_OnChanged;
        }