コード例 #1
0
        public override IEnumerable <INodeFactory> GetNodeChildren(IContext context)
        {
            List <INodeFactory> factories = new List <INodeFactory>
            {
                new SelectedProjectItemsNodeFactory(_dte.SelectedItems),
                new SelectedProjectsNodeFactory(_dte.SelectedItems)
            };

            var codeModel = new SelectedCodeModelItemsCollectionNodeFactory(_dte);

            if (PathTopologyVersions.SupportsSelectedCodeModelItemContainer(context))
            {
                factories.Add(codeModel);
            }
            else
            {
                factories.AddRange(codeModel.GetNodeChildren(context));
            }

            if (null != _dte.ActiveDocument)
            {
                factories.Add(new DocumentNodeFactory(_dte.ActiveDocument, "ActiveDocument"));
            }



            return(factories);
        }
コード例 #2
0
        public override IEnumerable <INodeFactory> GetNodeChildren(IContext context)
        {
            List <INodeFactory> factories = new List <INodeFactory>();

            if (null != _item.ProjectItems)
            {
                foreach (ProjectItem item in _item.ProjectItems)
                {
                    factories.Add(ProjectNodeFactory.Create(item));
                }
            }

            if (PathTopologyVersions.SupportsProjectItemCodeModel(context))
            {
                if (null != _item.FileCodeModel)
                {
                    factories.Add(new FileCodeModelNodeFactory(_item.FileCodeModel));
                }
            }

            if (null != _item.Properties)
            {
                factories.Add(new PropertyCollectionNodeFactory("ItemProperties", _item.Properties));
            }

            return(factories);
        }
コード例 #3
0
        public override IEnumerable <INodeFactory> GetNodeChildren(IContext context)
        {
            var factories = new List <INodeFactory>();

            if (null != _dte.Solution && null != _dte.Solution.SolutionBuild)
            {
                factories.Add(new SolutionBuildNodeFactory(_dte.Solution.SolutionBuild));
            }

            factories.Add(new SolutionProjectsNodeFactory(_dte));

            if (PathTopologyVersions.SupportsSolutionCodeModel(context))
            {
                factories.Add(new SolutionCodeModelNodeFactory(_dte));
            }

            return(factories);
        }