/// <summary> /// Load the documentation sources /// </summary> /// <param name="createRoot">True to create the root documentation source node or false to find it and /// reload it.</param> /// <returns>The root reference item node</returns> private TreeNode LoadDocSources(bool createRoot) { TreeNode source, root = null; TreeNode[] matches; if(createRoot) { root = new TreeNode("Documentation Sources"); root.Tag = new NodeData(BuildAction.DocumentationSource, null); root.Name = "*DocSources"; root.ImageIndex = root.SelectedImageIndex = (int)NodeIcon.DocSourceFolder; tvProjectFiles.Nodes[0].Nodes.Add(root); if(docSources != null) docSources.ListChanged -= docSources_ListChanged; // Cast it back to the collection so that we can use it for editing docSources = (DocumentationSourceCollection)currentProject.DocumentationSources; docSources.ListChanged += docSources_ListChanged; } else { matches = tvProjectFiles.Nodes[0].Nodes.Find("*DocSources", false); if(matches.Length == 1) root = matches[0]; } if(root != null) { root.Nodes.Clear(); foreach(DocumentationSource ds in docSources.OrderBy(ds => ds.SourceDescription)) { source = new TreeNode(ds.SourceDescription); source.Name = ds.SourceFile; source.Tag = new NodeData(BuildAction.DocumentationSource, ds); source.ImageIndex = source.SelectedImageIndex = (int)NodeIcon.DocSource; root.Nodes.Add(source); } root.Expand(); } return root; }
/// <summary> /// This refreshes the project instance property values by reloading them from the underlying MSBuild /// project. /// </summary> public void RefreshProjectProperties() { projectPropertyCache = null; docSources = null; apiFilter = null; namespaceSummaries = null; componentConfigs = null; plugInConfigs = null; msBuildProject.ReevaluateIfNecessary(); this.LoadProperties(); }
//===================================================================== /// <summary> /// Constructor /// </summary> /// <overloads>There are five overloads for the constructor</overloads> protected SandcastleProject() { characterMatchEval = new MatchEvaluator(this.OnCharacterMatch); buildVarMatchEval = new MatchEvaluator(this.OnBuildVarMatch); docSources = new DocumentationSourceCollection(this); docSources.ListChanged += docSources_ListChanged; namespaceSummaries = new NamespaceSummaryItemCollection(this); namespaceSummaries.ListChanged += ItemList_ListChanged; references = new ReferenceItemCollection(this); references.ListChanged += ItemList_ListChanged; componentConfigs = new ComponentConfigurationDictionary(this); plugInConfigs = new PlugInConfigurationDictionary(this); apiFilter = new ApiFilterCollection(this); apiFilter.ListChanged += ItemList_ListChanged; helpAttributes = new MSHelpAttrCollection(this); helpAttributes.ListChanged += ItemList_ListChanged; try { loadingProperties = removeProjectWhenDisposed = true; contentPlacement = ContentPlacement.AboveNamespaces; cleanIntermediates = keepLogFile = binaryTOC = includeStopWordList = true; this.BuildLogFile = null; missingTags = MissingTags.Summary | MissingTags.Parameter | MissingTags.TypeParameter | MissingTags.Returns | MissingTags.AutoDocumentCtors | MissingTags.Namespace | MissingTags.AutoDocumentDispose; visibleItems = VisibleItems.InheritedFrameworkMembers | VisibleItems.InheritedMembers | VisibleItems.Protected | VisibleItems.ProtectedInternalAsProtected; buildAssemblerVerbosity = BuildAssemblerVerbosity.OnlyWarningsAndErrors; helpFileFormat = HelpFileFormats.HtmlHelp1; htmlSdkLinkType = websiteSdkLinkType = HtmlSdkLinkType.Msdn; help2SdkLinkType = MSHelp2SdkLinkType.Msdn; helpViewerSdkLinkType = MSHelpViewerSdkLinkType.Msdn; sdkLinkTarget = SdkLinkTarget.Blank; presentationStyle = Constants.DefaultPresentationStyle; namingMethod = NamingMethod.Guid; syntaxFilters = ComponentUtilities.DefaultSyntaxFilter; collectionTocStyle = CollectionTocStyle.Hierarchical; helpFileVersion = "1.0.0.0"; tocOrder = -1; maximumGroupParts = 2; this.OutputPath = null; this.HtmlHelp1xCompilerPath = this.HtmlHelp2xCompilerPath = this.WorkingPath = this.ComponentPath = null; this.HelpTitle = this.HtmlHelpName = this.CopyrightHref = this.CopyrightText = this.FeedbackEMailAddress = this.FeedbackEMailLinkText = this.HeaderText = this.FooterText = this.ProjectSummary = this.RootNamespaceTitle = this.PlugInNamespaces = this.TopicVersion = this.TocParentId = this.TocParentVersion = this.CatalogProductId = this.CatalogVersion = this.CatalogName = null; this.FrameworkVersion = null; language = new CultureInfo("en-US"); } finally { loadingProperties = false; } }