public UDNParsingResults(string path, ITextSnapshot snapshot, MarkdownPackage package, Markdown markdown, FolderDetails folderDetails)
        {
            var log = new OutputPaneLogger();
            ParsedSnapshot = snapshot;

            // Use the Publish Flag combo box to set the markdown details.
            markdown.PublishFlags.Clear();

            // Always include public
            markdown.PublishFlags.Add(Settings.Default.PublicAvailabilitiesString);

            foreach (var flagName in package.PublishFlags)
            {
                markdown.PublishFlags.Add(flagName);
            }

            Errors = new List<ErrorDetail>();
            Images = new List<ImageConversion>();
            Attachments = new List<AttachmentConversionDetail>();

            Document = markdown.ParseDocument(ParsedSnapshot.GetText(), Errors, Images, Attachments, folderDetails);

            DoxygenHelper.SetTrackedSymbols(Document.TransformationData.FoundDoxygenSymbols);

            CommonUnrealFunctions.CopyDocumentsImagesAndAttachments(
                path, log, folderDetails.AbsoluteHTMLPath, folderDetails.Language,
                folderDetails.CurrentFolderFromMarkdownAsTopLeaf, Images, Attachments);

            // Create common directories like css includes top level images etc. 
            // Needs to be created everytime the document is generated to allow
            // changes to these files to show in the preview window without
            // restarting VS.
            CommonUnrealFunctions.CreateCommonDirectories(
                folderDetails.AbsoluteHTMLPath, folderDetails.AbsoluteMarkdownPath, log);
        }
예제 #2
0
        public UDNDocView(string sourceFilePath, IWpfTextView textEditorView, IVsWindowFrame windowFrame, MarkdownPackage package, IVsUIShell uiShell)
        {
            SourceFilePath = sourceFilePath;
            TextEditorView = textEditorView;
            WindowFrame = windowFrame;

            NavigateToComboData = new NavigateToComboData(textEditorView, uiShell);
            ParsingResultsCache = new UDNParsingResultsCache(package, sourceFilePath, textEditorView);
        }
 public UDNDocRunningTableMonitor(IVsRunningDocumentTable rdt, IVsMonitorSelection ms, IVsEditorAdaptersFactoryService eafs, IVsUIShell uiShell, MarkdownPackage package)
 {
     this.RunningDocumentTable = rdt;
     this.MonitorSelection = ms;
     this.EditorAdaptersFactoryService = eafs;
     this.UIShell = uiShell;
     this.package = package;
     ms.GetCmdUIContextCookie(GuidList.guidMarkdownUIContext, out MarkdownModeUIContextCookie);
 }
예제 #4
0
        public UDNParsingResultsCache(MarkdownPackage package, string path, ITextView view)
        {
            this.package = package;
            this.path    = path;
            this.view    = view;

            markdownTransformSetup(path, markdown, folderDetails);

            AfterParsingEvent += (results) =>
            {
                UDNDocRunningTableMonitor.CurrentUDNDocView.NavigateToComboData.RefreshComboItems(results);
                UDNDocRunningTableMonitor.CurrentUDNDocView.TextEditorView.TextBuffer.Properties
                .GetProperty <OutliningTagger>(typeof(OutliningTagger)).ReparseFile(results);
                UDNDocRunningTableMonitor.CurrentUDNDocView.TextEditorView.TextBuffer.Properties
                .GetProperty <MarkdownClassifier>(typeof(MarkdownClassifier)).Reclassify(results);
            };
        }
예제 #5
0
        public UDNParsingResults(string path, ITextSnapshot snapshot, MarkdownPackage package, Markdown markdown, FolderDetails folderDetails)
        {
            var log = new OutputPaneLogger();

            ParsedSnapshot = snapshot;

            // Use the Publish Flag combo box to set the markdown details.
            markdown.PublishFlags.Clear();

            // Always include public
            markdown.PublishFlags.Add(Settings.Default.PublicAvailabilitiesString);

            foreach (var flagName in package.PublishFlags)
            {
                markdown.PublishFlags.Add(flagName);
            }

            Errors      = new List <ErrorDetail>();
            Images      = new List <ImageConversion>();
            Attachments = new List <AttachmentConversionDetail>();

            Document = markdown.ParseDocument(ParsedSnapshot.GetText(), Errors, Images, Attachments, folderDetails);

            DoxygenHelper.SetTrackedSymbols(Document.TransformationData.FoundDoxygenSymbols);

            CommonUnrealFunctions.CopyDocumentsImagesAndAttachments(
                path, log, folderDetails.AbsoluteHTMLPath, folderDetails.Language,
                folderDetails.CurrentFolderFromMarkdownAsTopLeaf, Images, Attachments);

            // Create common directories like css includes top level images etc.
            // Needs to be created everytime the document is generated to allow
            // changes to these files to show in the preview window without
            // restarting VS.
            CommonUnrealFunctions.CreateCommonDirectories(
                folderDetails.AbsoluteHTMLPath, folderDetails.AbsoluteMarkdownPath, log);
        }
 public UDNDocRunningTableMonitor(IVsRunningDocumentTable rdt, IVsMonitorSelection ms, IVsEditorAdaptersFactoryService eafs, IVsUIShell uiShell, MarkdownPackage package)
 {
     this.RunningDocumentTable         = rdt;
     this.MonitorSelection             = ms;
     this.EditorAdaptersFactoryService = eafs;
     this.UIShell = uiShell;
     this.package = package;
     ms.GetCmdUIContextCookie(GuidList.guidMarkdownUIContext, out MarkdownModeUIContextCookie);
 }
        public UDNParsingResultsCache(MarkdownPackage package, string path, ITextView view)
        {
            this.package = package;
            this.path = path;
            this.view = view;

            markdownTransformSetup(path, markdown, folderDetails);

            AfterParsingEvent += (results) =>
                {
                    UDNDocRunningTableMonitor.CurrentUDNDocView.NavigateToComboData.RefreshComboItems(results);
                    UDNDocRunningTableMonitor.CurrentUDNDocView.TextEditorView.TextBuffer.Properties
                                             .GetProperty<OutliningTagger>(typeof(OutliningTagger)).ReparseFile(results);
                    UDNDocRunningTableMonitor.CurrentUDNDocView.TextEditorView.TextBuffer.Properties
                                             .GetProperty<MarkdownClassifier>(typeof(MarkdownClassifier)).Reclassify(results);
                };
        }
예제 #8
0
        public UDNDocView(string sourceFilePath, IWpfTextView textEditorView, IVsWindowFrame windowFrame, MarkdownPackage package, IVsUIShell uiShell)
        {
            SourceFilePath = sourceFilePath;
            TextEditorView = textEditorView;
            WindowFrame    = windowFrame;

            NavigateToComboData = new NavigateToComboData(textEditorView, uiShell);
            ParsingResultsCache = new UDNParsingResultsCache(package, sourceFilePath, textEditorView);
        }