protected IProjectContent GetParserContext()
        {
            CheckInitialized();

            IViewContent view    = document.Window.ViewContent;
            string       file    = view.IsUntitled ? view.UntitledName : view.ContentName;
            Project      project = view.Project;

            if (project != null)
            {
                return(TypeSystemService.GetProjectContext(project));
            }
            return(TypeSystemService.GetContext(file, Document.Editor.Document.MimeType, Document.Editor.Text));
        }