protected override void OnParsedDocumentUpdated()
        {
            base.OnParsedDocumentUpdated();
            aspDoc = CU as WebFormsParsedDocument;
            if (HasDoc)
            {
                refman.Doc = aspDoc;
            }

            var newProj = Document.Project as AspNetAppProject;

            if (newProj != null)
            {
                project        = newProj;
                refman.Project = newProj;
            }

            documentBuilder = HasDoc ? LanguageCompletionBuilderService.GetBuilder(aspDoc.Info.Language) : null;

            if (documentBuilder != null)
            {
                documentInfo = new DocumentInfo(refman.Compilation, aspDoc, refman.GetUsings());
                documentInfo.ParsedDocument  = documentBuilder.BuildDocument(documentInfo, Editor);
                documentInfo.CodeBesideClass = CreateCodeBesideClass(documentInfo, refman);
            }
        }
        protected override void OnParsedDocumentUpdated()
        {
            base.OnParsedDocumentUpdated();
            aspDoc = CU as AspNetParsedDocument;

            var newProj = base.Document.Project as AspNetAppProject;

            if (newProj == null)
            {
                return;
            }
            //throw new InvalidOperationException ("Document has no project");

            if (project != newProj)
            {
                project = newProj;
                refman  = new DocumentReferenceManager(project);
            }

            if (HasDoc)
            {
                refman.Doc = aspDoc;
            }

            documentBuilder = HasDoc ? LanguageCompletionBuilderService.GetBuilder(aspDoc.Info.Language) : null;

            if (documentBuilder != null)
            {
                documentInfo = new DocumentInfo(document.Compilation, aspDoc, refman.GetUsings(), refman.GetDoms());
                documentInfo.ParsedDocument  = documentBuilder.BuildDocument(documentInfo, Editor);
                documentInfo.CodeBesideClass = CreateCodeBesideClass(documentInfo, refman);
            }
        }