Beispiel #1
0
		protected void VisitProject( ProjectComponent project, ProjectItem item )
		{
			if( item.SubProject == null )
			{
				FileComponent file = VisitFile( item );
				if( file != null )
					project.Visit( file );
			}
		}
Beispiel #2
0
		protected void WalkProjectItems( ProjectComponent project,  ProjectItems itemList )
		{
			if( itemList != null )
			{
				foreach( ProjectItem item in itemList )
				{
					VisitProject( project, item );
				
					WalkProjectItems( project, item.ProjectItems ); // Get children.
				}
			}
		}
Beispiel #3
0
		public SolutionComponent CreateModel( _DTE app )
		{
			m_app = app;

			string name = Path.GetFileNameWithoutExtension(app.Solution.FileName);
			SolutionComponent sol = new SolutionComponent( app.Solution.FullName, name );

			foreach( Project p in app.Solution )
			{
				ProjectComponent project = new ProjectComponent( p.FullName, p.Name );
				if( p.ProjectItems != null )
				{
					WalkProjectItems( project, p.ProjectItems );
					sol.Visit( project );
				}
			}
			return sol;
		}