예제 #1
0
		public override void ProcessFindParameters( SolutionComponent solution )
		{
			int min = TryParse( txtMinLen.Text );
			int iter = TryParse( txtIterations.Text );
			int cond = TryParse( txtConditionals.Text );

			if( min < 0 || iter < 0 || cond < 0 )
			{
				MessageBox.Show( "Enter an integer greater than 0" );
				return;
			}

			ArrayList results = null;
			DetectLongMethod detect = new DetectLongMethod( min, iter, cond );
			
			//if( cmbLocations.SelectedItem.Equals( "Entire Solution" ) )
			{		
				results = detect.Search( solution );
			}
			
			if( results != null && results.Count > 0 )
			{
				LongMethodVisualization vis = new LongMethodVisualization();
				SortMethods( results );
				int maxLength = ((MethodComponent)results[0]).Lines.Count;
				vis.LoadResults( results, maxLength );
				vis.Show();
			}
			else
			{
				MessageBox.Show( "No results found!" );
			}
		}
예제 #2
0
		private void LoadSolution()
		{
			if( m_appInst != null )
			{
				ModelBuilder mb = new ModelBuilder();
				m_solution = mb.CreateModel( m_appInst );
			}
		}
예제 #3
0
		public override void ProcessFindParameters(SolutionComponent solution)
		{
			HackDetector det = new HackDetector();
			ArrayList list = det.Search( solution );

			HackVisualization vis = new HackVisualization();
			vis.LoadResults( null /*list*/ );
			vis.Show();
		}
예제 #4
0
		public override ArrayList Search( SolutionComponent solution )
		{
			ArrayList list = new ArrayList();
			foreach( ProjectComponent project in solution.Projects )
			{
				foreach( FileComponent file in project.Files )
				{
					foreach( ClassComponent cls in file.Classes )
					{
						list.AddRange( Search( cls ) );
					}
				}
			}
			return list;
		}
예제 #5
0
		public override ArrayList Search( SolutionComponent solution )
		{
			foreach( ProjectComponent project in solution.Projects )
			{
				foreach( FileComponent file in project.Files )
				{
					foreach( ClassComponent cls in file.Classes )
					{
						Search( cls );
					}
				}
			}
			ArrayList list = new ArrayList( m_htMessageChains.Values );
			list.Sort( new MessageChainComponent.MessageChainComparer( MessageChainComponent.MessageChainComparer.SortDirection.Descending ) );
			return list;
		}
		public override ArrayList Search( SolutionComponent solution )
		{
			foreach( ProjectComponent project in solution.Projects )
			{
				foreach( FileComponent file in project.Files )
				{
					foreach( ClassComponent cls in file.Classes )
					{
						ProcessStuff( cls );
					}
				}
			}

			m_list.Sort( new TemporaryFieldComparer( TemporaryFieldComparer.SortDirection.Descending ) );
			return m_list;
		}
		public override ArrayList Search( SolutionComponent solution )
		{
			foreach( ProjectComponent project in solution.Projects )
			{
				foreach( FileComponent file in project.Files )
				{
					foreach( ClassComponent cls in file.Classes )
					{
						ProcessStuff( cls );
					}
				}
			}

			m_list.AddRange( m_htTypeCodes.Values );
			m_list.Sort( new SwitchStatementComparer( SwitchStatementComparer.SortDirection.Descending ) );
			return m_list;
		}
예제 #8
0
		public override void ProcessFindParameters(SolutionComponent solution)
		{
			ArrayList results = null;
			TemporaryFieldDetector detect = new TemporaryFieldDetector();
				
			results = detect.Search( solution );
	
			if( results != null && results.Count > 0 )
			{
				TemporaryFieldVisualization vis = new TemporaryFieldVisualization();
				vis.LoadResults( results );
				vis.Show();
			}
			else
			{
				MessageBox.Show( "No results found!" );
			}
		}
		public override void ProcessFindParameters(SolutionComponent solution)
		{
			ArrayList results = null;
			//ParallelInheritanceHierarchyDetector detect = new ParallelInheritanceHierarchyDetector();
				
			//results = detect.Search( solution );
	
			//if( results != null && results.Count > 0 )
			{
				ParallelInheritanceHierarchyVisualization vis = new ParallelInheritanceHierarchyVisualization();
				vis.LoadResults( null );
				vis.Show();
			}
			//else
			{
			//	MessageBox.Show( "No results found!" );
			}
		}
예제 #10
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;
		}
		public override ArrayList Search( SolutionComponent solution )
		{
			foreach( ProjectComponent project in solution.Projects )
			{
				foreach( FileComponent file in project.Files )
				{
					foreach( ClassComponent cls in file.Classes )
					{
						Search( cls );
					}
				}
			}

			GatherParallel();
			//ArrayList list = new ArrayList( m_htMessageChains.Values );
			//list.Sort( new ParallelInheritanceHierarchyComponent.ParallelInheritanceHierarchyComparer( 
			//	ParallelInheritanceHierarchyComponent.ParallelInheritanceHierarchyComparer.SortDirection.Descending ) );
			return null;
		}
예제 #12
0
		public abstract void ProcessFindParameters( SolutionComponent solution );