public override void BuildChildNodes (ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection) dataObject; ctx.AddChildren (refs); // For portable libraries, add node that represents all framework assemblies var project = (DotNetProject) ctx.GetParentDataItem (typeof(DotNetProject), false); if (project != null && project.IsPortableLibrary) ctx.AddChild (new PortableFrameworkSubset (project)); }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { var serviceFolder = GetServiceStateFolder (treeBuilder, dataObject); if (!string.IsNullOrEmpty (serviceFolder)) { var project = (Project)treeBuilder.GetParentDataItem (typeof (Project), true); foreach (var file in Directory.GetFiles (serviceFolder)) { treeBuilder.AddChild (new Ide.Gui.Pads.ProjectPad.SystemFile (file, project)); } } }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; ProjectInformation info = ProjectInformationManager.Instance.Get (p); foreach (Macro m in info.Macros) treeBuilder.AddChild (m); }
public override bool HasChildNodes (ITreeBuilder builder, object dataObject) { if (base.HasChildNodes (builder, dataObject)) return true; DotNetProject p = (DotNetProject) builder.GetParentDataItem (typeof(DotNetProject), false); if (p != null) { AddinData data = AddinData.GetAddinData (p); if (data != null) return data.CachedAddinManifest.MainModule.Dependencies.Count > 0; } return false; }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { base.BuildChildNodes (treeBuilder, dataObject); DotNetProject p = (DotNetProject) treeBuilder.GetParentDataItem (typeof(DotNetProject), false); if (p != null) { AddinData data = AddinData.GetAddinData (p); if (data != null) { foreach (Dependency adep in data.CachedAddinManifest.MainModule.Dependencies) treeBuilder.AddChild (adep); } } }
public override void BuildChildNodes (ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection) dataObject; ctx.AddChildren (refs); // For portable libraries, add node that represents all framework assemblies var project = (DotNetProject) ctx.GetParentDataItem (typeof(DotNetProject), false); if (project != null) { var tfm = project.TargetFramework.Id; if (tfm.Identifier == MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.ID_PORTABLE && tfm.Version != "5.0") { ctx.AddChild (new PortableFrameworkSubset (project)); } } }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; ProjectInformation info = ProjectInformationManager.Instance.Get (p); Enumeration thisEnumeration = (Enumeration)dataObject; // Enumerators foreach (Enumerator e in info.Enumerators) if (e.Parent != null && e.Parent.Equals (thisEnumeration)) treeBuilder.AddChild (e); }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; /*foreach (Symbol glob in info.Globals) { * if(glob.Ours) * treeBuilder.AddChild (glob); * }*/ }
public override void BuildChildNodes (ITreeBuilder builder, object dataObject) { string path = GetFolderPath (dataObject); Project project = builder.GetParentDataItem (typeof(Project), true) as Project; if (project == null) return; ProjectFileCollection files; List<string> folders; GetFolderContent (project, path, out files, out folders); builder.AddChildren (files); builder.AddChildren (folders.Select (f => new ProjectFolder (f, project, dataObject))); }
bool MoveToWorkspace(ITreeBuilder builder, FilePath directoryPath) { Workspace workspace = builder.GetParentDataItem <Workspace> (true); if (workspace == null) { return(false); } if (!builder.MoveToObject(workspace)) { return(false); } return(workspace.BaseDirectory == directoryPath.CanonicalPath.ParentDirectory); }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } ProjectInformation info = ProjectInformationManager.Instance.Get(p); foreach (Macro m in info.Macros) { treeBuilder.AddChild(m); } }
public override void BuildChildNodes(ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection)dataObject; foreach (ProjectReference pref in refs) { ctx.AddChild(pref); } // For portable libraries, add node that represents all framework assemblies var project = ctx.GetParentDataItem(typeof(DotNetProject), false) as PortableDotNetProject; if (project != null) { ctx.AddChild(new TreeViewItem(GettextCatalog.GetString(".NET Portable Subset"), "md-reference-package")); } }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { base.BuildChildNodes(treeBuilder, dataObject); DotNetProject p = (DotNetProject)treeBuilder.GetParentDataItem(typeof(DotNetProject), false); if (p != null) { AddinData data = AddinData.GetAddinData(p); if (data != null) { foreach (Dependency adep in data.CachedAddinManifest.MainModule.Dependencies) { treeBuilder.AddChild(adep); } } } }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; bool publicOnly = treeBuilder.Options["PublicApiOnly"]; ProjectInformation info = ProjectInformationManager.Instance.Get (p); Structure thisStruct = (Structure)dataObject; // Classes foreach (Class c in info.Classes) if (c.Parent != null && c.Parent.Equals (thisStruct) && (!publicOnly || c.Access == AccessModifier.Public)) treeBuilder.AddChild (c); // Structures foreach (Structure s in info.Structures) if (s.Parent != null && s.Parent.Equals (thisStruct) && (!publicOnly || s.Access == AccessModifier.Public)) treeBuilder.AddChild (s); // Unions foreach (Union u in info.Unions) if (u.Parent != null && u.Parent.Equals (thisStruct) && (!publicOnly || u.Access == AccessModifier.Public)) treeBuilder.AddChild (u); // Enumerations foreach (Enumeration e in info.Enumerations) if (e.Parent != null && e.Parent.Equals (thisStruct) && (!publicOnly || e.Access == AccessModifier.Public)) treeBuilder.AddChild (e); // Typedefs foreach (Typedef t in info.Typedefs) if (t.Parent != null && t.Parent.Equals (thisStruct) && (!publicOnly || t.Access == AccessModifier.Public)) treeBuilder.AddChild (t); // Functions foreach (Function f in info.Functions) if (f.Parent != null && f.Parent.Equals (thisStruct) && (!publicOnly || f.Access == AccessModifier.Public)) treeBuilder.AddChild (f); // Members foreach (Member m in info.Members) if (m.Parent != null && m.Parent.Equals (thisStruct) && (!publicOnly || m.Access == AccessModifier.Public)) treeBuilder.AddChild (m); }
public override void BuildChildNodes(ITreeBuilder builder, object dataObject) { string path = GetFolderPath (dataObject); if (builder.Options ["ShowAllFiles"] && Directory.Exists (path)) { Project project = (Project) builder.GetParentDataItem (typeof(Project), true); foreach (string file in Directory.GetFiles (path)) { if (project.ProjectFiles.GetFile (file) == null) builder.AddChild (new SystemFile (file, project)); } foreach (string folder in Directory.GetDirectories (path)) if (!builder.HasChild (Path.GetFileName (folder), typeof(ProjectFolder))) builder.AddChild (new ProjectFolder (folder, project)); } }
public override void BuildChildNodes(ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection)dataObject; foreach (ProjectReference pref in refs) { ctx.AddChild(pref); } // For portable libraries, add node that represents all framework assemblies var project = (DotNetProject)ctx.GetParentDataItem(typeof(DotNetProject), false); if (project != null && project.IsPortableLibrary) { ctx.AddChild(new PortableFrameworkSubset(project)); } }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; ProjectInformation info = ProjectInformationManager.Instance.Get (p); Namespace thisNamespace = ((Namespace)dataObject); // Namespaces if (treeBuilder.Options["NestedNamespaces"]) foreach (Namespace n in info.Namespaces) if (n.Parent != null && n.Parent.Equals (thisNamespace)) treeBuilder.AddChild (n); // Classes foreach (Class c in info.Classes) if (c.Parent != null && c.Parent.Equals (thisNamespace)) treeBuilder.AddChild (c); // Structures foreach (Structure s in info.Structures) if (s.Parent != null && s.Parent.Equals (thisNamespace)) treeBuilder.AddChild (s); // Unions foreach (Union u in info.Unions) if (u.Parent != null && u.Parent.Equals (thisNamespace)) treeBuilder.AddChild (u); // Enumerations foreach (Enumeration e in info.Enumerations) if (e.Parent != null && e.Parent.Equals (thisNamespace)) treeBuilder.AddChild (e); // Typedefs foreach (Typedef t in info.Typedefs) if (t.Parent != null && t.Parent.Equals (thisNamespace)) treeBuilder.AddChild (t); // Functions foreach (Function f in info.Functions) if (f.Parent != null && f.Parent.Equals (thisNamespace)) treeBuilder.AddChild (f); }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; ProjectInformation info = ProjectInformationManager.Instance.Get (p); Union thisUnion = (Union)dataObject; // Classes foreach (Class c in info.Classes) if (c.Parent != null && c.Parent.Equals (thisUnion)) treeBuilder.AddChild (c); // Structures foreach (Structure s in info.Structures) if (s.Parent != null && s.Parent.Equals (thisUnion)) treeBuilder.AddChild (s); // Unions foreach (Union u in info.Unions) if (u.Parent != null && u.Parent.Equals (thisUnion)) treeBuilder.AddChild (u); // Enumerations foreach (Enumeration e in info.Enumerations) if (e.Parent != null && e.Parent.Equals (thisUnion)) treeBuilder.AddChild (e); // Typedefs foreach (Typedef t in info.Typedefs) if (t.Parent != null && t.Parent.Equals (thisUnion)) treeBuilder.AddChild (t); // Functions foreach (Function f in info.Functions) if (f.Parent != null && f.Parent.Equals (thisUnion)) treeBuilder.AddChild (f); // Members foreach (Member m in info.Members) if (m.Parent != null && m.Parent.Equals (thisUnion)) treeBuilder.AddChild (m); }
public override void BuildChildNodes(ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection)dataObject; ctx.AddChildren(refs); // For portable libraries, add node that represents all framework assemblies var project = (DotNetProject)ctx.GetParentDataItem(typeof(DotNetProject), false); if (project != null) { var tfm = project.TargetFramework.Id; if (tfm.Identifier == MonoDevelop.Core.Assemblies.TargetFrameworkMoniker.ID_PORTABLE && tfm.Version != "5.0") { ctx.AddChild(new PortableFrameworkSubset(project)); } } }
public override void BuildChildNodes (ITreeBuilder builder, object dataObject) { string path = GetFolderPath (dataObject); Project project = builder.GetParentDataItem (typeof(Project), true) as Project; if (project == null) return; ProjectFileCollection files; ArrayList folders; GetFolderContent (project, path, out files, out folders); foreach (ProjectFile file in files) builder.AddChild (file); foreach (string folder in folders) builder.AddChild (new ProjectFolder (folder, project, dataObject)); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { if (base.HasChildNodes(builder, dataObject)) { return(true); } DotNetProject p = (DotNetProject)builder.GetParentDataItem(typeof(DotNetProject), false); if (p != null) { AddinData data = AddinData.GetAddinData(p); if (data != null) { return(data.CachedAddinManifest.MainModule.Dependencies.Count > 0); } } return(false); }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } bool publicOnly = treeBuilder.Options ["PublicApiOnly"]; SymbolDatabaseMediator info = p.DB; Struct thisStruct = (Struct)dataObject; /*foreach (Symbol s in info.CanBeInClasses.Values) * if (s.Ours && s.Parent != null && s.Parent.Equals (thisStruct) && (!publicOnly || s.Access == CX_CXXAccessSpecifier.@Public)) * treeBuilder.AddChild (s);*/ }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; Enumeration thisEnumeration = (Enumeration)dataObject; // Enumerators /*foreach (Enumerator e in info.Enumerators) * if (e. Ours && e.Parent != null && e.Parent.Equals (thisEnumeration)) * treeBuilder.AddChild (e);*/ }
public override void BuildChildNodes (ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem (typeof(CProject), false) as CProject; if (p == null) return; ProjectInformation info = ProjectInformationManager.Instance.Get (p); // Classes foreach (Class c in info.Classes) if (c.Parent == null) treeBuilder.AddChild (c); // Structures foreach (Structure s in info.Structures) if (s.Parent == null) treeBuilder.AddChild (s); // Unions foreach (Union u in info.Unions) if (u.Parent == null) treeBuilder.AddChild (u); // Enumerations foreach (Enumeration e in info.Enumerations) if (e.Parent == null) treeBuilder.AddChild (e); // Typedefs foreach (Typedef t in info.Typedefs) if (t.Parent == null) treeBuilder.AddChild (t); // Functions foreach (Function f in info.Functions) if (f.Parent == null) treeBuilder.AddChild (f); // Variables foreach (Variable v in info.Variables) treeBuilder.AddChild (v); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { Project project = builder.GetParentDataItem(typeof(Project), true) as Project; if (project == null) { return(false); } // For big projects, a real HasChildNodes value is too slow to get if (project.Files.Count > 500) { return(true); } var folder = ((ProjectFolder)dataObject).Path; foreach (var file in project.Files) { FilePath path; if (!file.Visible || file.Flags.HasFlag(ProjectItemFlags.Hidden)) { continue; } if (file.Subtype != Subtype.Directory) { path = file.IsLink ? project.BaseDirectory.Combine(file.ProjectVirtualPath) : file.FilePath; } else { path = file.FilePath; } if (path.IsChildPathOf(folder)) { return(true); } } return(false); }
public override void BuildChildNodes (ITreeBuilder ctx, object dataObject) { var referenceFolder = (AssemblyReferenceFolder)dataObject; var wrapper = (AssemblyLoader)ctx.GetParentDataItem (typeof (AssemblyLoader), false); foreach (AssemblyNameReference assemblyNameReference in referenceFolder.AssemblyReferences) { try { string assemblyFile = wrapper.LookupAssembly (assemblyNameReference.FullName); if (assemblyFile != null && System.IO.File.Exists (assemblyFile)) { ctx.AddChild (assemblyNameReference); } else { ctx.AddChild (new Error (MonoDevelop.Core.GettextCatalog.GetString ("Can't load:") + assemblyNameReference.FullName)); } } catch (Exception) { // ctx.AddChild (new Error (MonoDevelop.Core.GettextCatalog.GetString ("Error while loading:") + assemblyNameReference.FullName + "/" + e.Message)); } } ctx.AddChildren (referenceFolder.ModuleReferences); }
public override void BuildChildNodes(ITreeBuilder builder, object dataObject) { var folder = (SystemFolder)dataObject; if (!Directory.Exists(folder.Path)) { return; } var item = (SolutionItem)builder.GetParentDataItem(typeof(SolutionItem), true); foreach (string path in Directory.GetFiles(folder.Path)) { builder.AddChild(new SystemFile(new FilePath(path), item, false)); } foreach (string path in Directory.GetDirectories(folder.Path)) { builder.AddChild(new SystemFolder(new FilePath(path), item, false)); } }
public override void BuildChildNodes(ITreeBuilder builder, object dataObject) { string path = GetFolderPath (dataObject); if (builder.Options ["ShowAllFiles"] && Directory.Exists (path)) { Project project = (Project) builder.GetParentDataItem (typeof(Project), true); SolutionFolderFileCollection folderFiles = null; if (dataObject is Solution) folderFiles = ((Solution)dataObject).RootFolder.Files; else if (dataObject is SolutionFolder) folderFiles = ((SolutionFolder)dataObject).Files; foreach (string file in Directory.GetFiles (path)) { if ((project == null || project.Files.GetFile (file) == null) && (folderFiles == null || !folderFiles.Contains (file))) builder.AddChild (new SystemFile (file, project)); } foreach (string folder in Directory.GetDirectories (path)) if (!builder.HasChild (Path.GetFileName (folder), typeof(ProjectFolder))) builder.AddChild (new ProjectFolder (folder, project)); } }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } ProjectInformation info = ProjectInformationManager.Instance.Get(p); Enumeration thisEnumeration = (Enumeration)dataObject; // Enumerators foreach (Enumerator e in info.Enumerators) { if (e.Parent != null && e.Parent.Equals(thisEnumeration)) { treeBuilder.AddChild(e); } } }
public override void BuildChildNodes(ITreeBuilder builder, object dataObject) { if (!builder.Options ["ShowAllFiles"]) { return; } string path = GetFolderPath(dataObject); if (Directory.Exists(path)) { Project project = (Project)builder.GetParentDataItem(typeof(Project), true); SolutionFolderFileCollection folderFiles = null; if (dataObject is Solution) { folderFiles = ((Solution)dataObject).RootFolder.Files; } else if (dataObject is SolutionFolder) { folderFiles = ((SolutionFolder)dataObject).Files; } foreach (string file in Directory.GetFiles(path)) { if ((project == null || project.Files.GetFile(file) == null) && (folderFiles == null || !folderFiles.Contains(file))) { builder.AddChild(new SystemFile(file, project)); } } foreach (string folder in Directory.GetDirectories(path)) { if (!builder.HasChild(Path.GetFileName(folder), typeof(ProjectFolder))) { builder.AddChild(new ProjectFolder(folder, project)); } } } }
public override void BuildChildNodes(ITreeBuilder ctx, object dataObject) { var referenceFolder = (AssemblyReferenceFolder)dataObject; var wrapper = (AssemblyLoader)ctx.GetParentDataItem(typeof(AssemblyLoader), false); foreach (AssemblyNameReference assemblyNameReference in referenceFolder.AssemblyReferences) { try { string assemblyFile = wrapper.LookupAssembly(assemblyNameReference.FullName); if (assemblyFile != null && System.IO.File.Exists(assemblyFile)) { ctx.AddChild(assemblyNameReference); } else { ctx.AddChild(new Error(MonoDevelop.Core.GettextCatalog.GetString("Can't load:") + assemblyNameReference.FullName)); } } catch (Exception) { // ctx.AddChild (new Error (MonoDevelop.Core.GettextCatalog.GetString ("Error while loading:") + assemblyNameReference.FullName + "/" + e.Message)); } } ctx.AddChildren(referenceFolder.ModuleReferences); }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = (CProject)treeBuilder.GetParentDataItem(typeof(CProject), false); if (p == null) { return; } SymbolDatabaseMediator info = p.DB; Namespace thisNamespace = ((Namespace)dataObject); // Namespaces /*if (treeBuilder.Options["NestedNamespaces"]) * foreach (Namespace n in info.Namespaces.Values) * if (n.Parent != null && n.Parent.Equals (thisNamespace)) * treeBuilder.AddChild (n); * * foreach(Symbol c in info.CanBeInNamespaces.Values) * if (c.Ours && c.Parent != null && c.Parent.Equals (thisNamespace)) * treeBuilder.AddChild (c);*/ }
DotNetProject GetProject(ITreeBuilder builder) { return(builder.GetParentDataItem(typeof(DotNetProject), false) as DotNetProject); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { Project project = builder.GetParentDataItem (typeof(Project), true) as Project; if (project == null) return false; // For big projects, a real HasChildNodes value is too slow to get if (project.Files.Count > 500) return true; var folder = ((ProjectFolder) dataObject).Path; foreach (var file in project.Files) { FilePath path; if (file.Subtype != Subtype.Directory) path = file.IsLink ? project.BaseDirectory.Combine (file.ProjectVirtualPath) : file.FilePath; else path = file.FilePath; if (path.IsChildPathOf (folder)) return true; } return false; }
public override bool HasChildNodes (ITreeBuilder builder, object dataObject) { if (((ProjectReferenceCollection) dataObject).Count > 0) return true; var p = (DotNetProject) builder.GetParentDataItem (typeof(DotNetProject), true); return p != null && p.IsPortableLibrary; }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } ProjectInformation info = ProjectInformationManager.Instance.Get(p); Union thisUnion = (Union)dataObject; // Classes foreach (Class c in info.Classes) { if (c.Parent != null && c.Parent.Equals(thisUnion)) { treeBuilder.AddChild(c); } } // Structures foreach (Structure s in info.Structures) { if (s.Parent != null && s.Parent.Equals(thisUnion)) { treeBuilder.AddChild(s); } } // Unions foreach (Union u in info.Unions) { if (u.Parent != null && u.Parent.Equals(thisUnion)) { treeBuilder.AddChild(u); } } // Enumerations foreach (Enumeration e in info.Enumerations) { if (e.Parent != null && e.Parent.Equals(thisUnion)) { treeBuilder.AddChild(e); } } // Typedefs foreach (Typedef t in info.Typedefs) { if (t.Parent != null && t.Parent.Equals(thisUnion)) { treeBuilder.AddChild(t); } } // Functions foreach (Function f in info.Functions) { if (f.Parent != null && f.Parent.Equals(thisUnion)) { treeBuilder.AddChild(f); } } // Members foreach (Member m in info.Members) { if (m.Parent != null && m.Parent.Equals(thisUnion)) { treeBuilder.AddChild(m); } } }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } bool publicOnly = treeBuilder.Options["PublicApiOnly"]; ProjectInformation info = ProjectInformationManager.Instance.Get(p); Structure thisStruct = (Structure)dataObject; // Classes foreach (Class c in info.Classes) { if (c.Parent != null && c.Parent.Equals(thisStruct) && (!publicOnly || c.Access == AccessModifier.Public)) { treeBuilder.AddChild(c); } } // Structures foreach (Structure s in info.Structures) { if (s.Parent != null && s.Parent.Equals(thisStruct) && (!publicOnly || s.Access == AccessModifier.Public)) { treeBuilder.AddChild(s); } } // Unions foreach (Union u in info.Unions) { if (u.Parent != null && u.Parent.Equals(thisStruct) && (!publicOnly || u.Access == AccessModifier.Public)) { treeBuilder.AddChild(u); } } // Enumerations foreach (Enumeration e in info.Enumerations) { if (e.Parent != null && e.Parent.Equals(thisStruct) && (!publicOnly || e.Access == AccessModifier.Public)) { treeBuilder.AddChild(e); } } // Typedefs foreach (Typedef t in info.Typedefs) { if (t.Parent != null && t.Parent.Equals(thisStruct) && (!publicOnly || t.Access == AccessModifier.Public)) { treeBuilder.AddChild(t); } } // Functions foreach (Function f in info.Functions) { if (f.Parent != null && f.Parent.Equals(thisStruct) && (!publicOnly || f.Access == AccessModifier.Public)) { treeBuilder.AddChild(f); } } // Members foreach (Member m in info.Members) { if (m.Parent != null && m.Parent.Equals(thisStruct) && (!publicOnly || m.Access == AccessModifier.Public)) { treeBuilder.AddChild(m); } } }
DotNetProject GetProject (ITreeBuilder builder) { return builder.GetParentDataItem (typeof(DotNetProject), false) as DotNetProject; }
public override void BuildChildNodes (ITreeBuilder ctx, object dataObject) { ProjectReferenceCollection refs = (ProjectReferenceCollection) dataObject; foreach (ProjectReference pref in refs) ctx.AddChild (pref); // For portable libraries, add node that represents all framework assemblies var project = ctx.GetParentDataItem (typeof(DotNetProject), false) as PortableDotNetProject; if (project != null) ctx.AddChild (new TreeViewItem (GettextCatalog.GetString (".NET Portable Subset"), "md-reference-package")); }
public override void BuildChildNodes (ITreeBuilder builder, object dataObject) { if (!builder.Options ["ShowAllFiles"]) return; string path = GetFolderPath (dataObject); if (Directory.Exists (path)) { Project project = (Project) builder.GetParentDataItem (typeof(Project), true); SolutionFolderFileCollection folderFiles = null; if (dataObject is Solution) folderFiles = ((Solution)dataObject).RootFolder.Files; else if (dataObject is SolutionFolder) folderFiles = ((SolutionFolder)dataObject).Files; builder.AddChildren (Directory.EnumerateFiles (path) .Where (file => (project == null || project.Files.GetFile (file) == null) && (folderFiles == null || !folderFiles.Contains (file))) .Select (file => new SystemFile (file, project))); builder.AddChildren (Directory.EnumerateDirectories (path) .Where (folder => !builder.HasChild (Path.GetFileName (folder), typeof (ProjectFolder))) .Select (folder => new ProjectFolder (folder, project))); } }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } ProjectInformation info = ProjectInformationManager.Instance.Get(p); Namespace thisNamespace = ((Namespace)dataObject); // Namespaces if (treeBuilder.Options["NestedNamespaces"]) { foreach (Namespace n in info.Namespaces) { if (n.Parent != null && n.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(n); } } } // Classes foreach (Class c in info.Classes) { if (c.Parent != null && c.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(c); } } // Structures foreach (Structure s in info.Structures) { if (s.Parent != null && s.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(s); } } // Unions foreach (Union u in info.Unions) { if (u.Parent != null && u.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(u); } } // Enumerations foreach (Enumeration e in info.Enumerations) { if (e.Parent != null && e.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(e); } } // Typedefs foreach (Typedef t in info.Typedefs) { if (t.Parent != null && t.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(t); } } // Functions foreach (Function f in info.Functions) { if (f.Parent != null && f.Parent.Equals(thisNamespace)) { treeBuilder.AddChild(f); } } }
public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, ref string label, ref Pixbuf icon, ref Pixbuf closedIcon) { AddinData data = (AddinData) treeBuilder.GetParentDataItem (typeof(AddinData), false); label = AddinManager.CurrentLocalizer.GetString ("Extension Points ({0})", data.CachedAddinManifest.ExtensionPoints.Count); icon = Context.GetIcon ("md-extension-point"); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { return(((ProjectReferenceCollection)dataObject).Count > 0 || builder.GetParentDataItem(typeof(DotNetProject), false) is PortableDotNetProject); }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { return ((ProjectReferenceCollection) dataObject).Count > 0 || builder.GetParentDataItem (typeof(DotNetProject), false) is PortableDotNetProject; }
public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject) { CProject p = treeBuilder.GetParentDataItem(typeof(CProject), false) as CProject; if (p == null) { return; } ProjectInformation info = ProjectInformationManager.Instance.Get(p); // Classes foreach (Class c in info.Classes) { if (c.Parent == null) { treeBuilder.AddChild(c); } } // Structures foreach (Structure s in info.Structures) { if (s.Parent == null) { treeBuilder.AddChild(s); } } // Unions foreach (Union u in info.Unions) { if (u.Parent == null) { treeBuilder.AddChild(u); } } // Enumerations foreach (Enumeration e in info.Enumerations) { if (e.Parent == null) { treeBuilder.AddChild(e); } } // Typedefs foreach (Typedef t in info.Typedefs) { if (t.Parent == null) { treeBuilder.AddChild(t); } } // Functions foreach (Function f in info.Functions) { if (f.Parent == null) { treeBuilder.AddChild(f); } } // Variables foreach (Variable v in info.Variables) { treeBuilder.AddChild(v); } }
public override bool HasChildNodes(ITreeBuilder builder, object dataObject) { Project project = builder.GetParentDataItem (typeof(Project), true) as Project; // For big projects, a real HasChildNodes value is too slow to get if (project.ProjectFiles.Count > 500) return true; ProjectFileCollection files; ArrayList folders; string path = GetFolderPath (dataObject); GetFolderContent (project, path, out files, out folders); if (files.Count > 0 || folders.Count > 0) return true; return false; }