public IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context)
        {
            var gv = new GatherVisitor(context);

            context.RootNode.AcceptVisitor(gv);
            return(gv.CallFinder.FoundIssues);
        }
        public IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context)
        {
            var gatherer = new GatherVisitor(context, tryResolve);
            var issues   = gatherer.GetIssues();

            return(issues);
        }
Ejemplo n.º 3
0
		public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
		{
			var visitor = new GatherVisitor (context, this);
			context.RootNode.AcceptVisitor (visitor);
			visitor.Collect ();
			return visitor.FoundIssues;
		}
Ejemplo n.º 4
0
            public static void Collect (GatherVisitor visitor, BlockStatement body)
            {
                var reachability = visitor.ctx.CreateReachabilityAnalysis (body);

                var collector = new StatementIssueCollector (visitor, reachability);
                collector.VisitBlockStatement (body);
            }
        public IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context)
        {
            var visitor = new GatherVisitor(context);

            context.RootNode.AcceptVisitor(visitor);
            return(visitor.FoundIssues);
        }
Ejemplo n.º 6
0
        public override IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context, string subIssue)
        {
            var visitor = new GatherVisitor(context);

            visitor.GetMethods();
            visitor.ComputeConflicts();
            return(visitor.GetIssues());
        }
Ejemplo n.º 7
0
        public override IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context, string subIssue)
        {
            var visitor = new GatherVisitor(context, this);

            context.RootNode.AcceptVisitor(visitor);
            visitor.Collect(0);
            return(visitor.FoundIssues);
        }
Ejemplo n.º 8
0
		public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
		{
			var sw = new Stopwatch();
			sw.Start();
			var gatherer = new GatherVisitor(context, tryResolve);
			var issues = gatherer.GetIssues();
			sw.Stop();
			Console.WriteLine("Elapsed time in ParameterCanBeDemotedIssue: {0} (Checked types: {3, 4} Qualified for resolution check: {5, 4} Members with issues: {4, 4} Method bodies resolved: {2, 4} File: '{1}')",
			                  sw.Elapsed, context.UnresolvedFile.FileName, gatherer.MethodResolveCount, gatherer.TypesChecked, gatherer.MembersWithIssues, gatherer.TypeResolveCount);
			return issues;
		}
        public IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context)
        {
//			var sw = new Stopwatch();
//			sw.Start();
            var gatherer = new GatherVisitor(context, tryResolve);
            var issues   = gatherer.GetIssues();

//			sw.Stop();
//			Console.WriteLine("Elapsed time in ParameterCanBeDemotedIssue: {0} (Checked types: {3, 4} Qualified for resolution check: {5, 4} Members with issues: {4, 4} Method bodies resolved: {2, 4} File: '{1}')",
//			                  sw.Elapsed, context.UnresolvedFile.FileName, gatherer.MethodResolveCount, gatherer.TypesChecked, gatherer.MembersWithIssues, gatherer.TypeResolveCount);
            return(issues);
        }
				public static void Collect (GatherVisitor visitor, BlockStatement body)
				{
					if (body.IsNull)
						return;
					var reachability = visitor.ctx.CreateReachabilityAnalysis (body);

					var collector = new StatementIssueCollector (visitor, reachability);
					collector.VisitBlockStatement (body);
				}
				private StatementIssueCollector (GatherVisitor visitor, ReachabilityAnalysis reachability)
				{
					collectedStatements = new HashSet<Statement> ();
					this.visitor = visitor;
					this.reachability = reachability;
				}
Ejemplo n.º 12
0
 public GatherVisitor(BaseRefactoringContext ctx, SuggestUseVarKeywordEvidentIssue qualifierDirectiveEvidentIssueProvider) : base(ctx, qualifierDirectiveEvidentIssueProvider)
 {
     GatherVisitor bla = this;
 }
Ejemplo n.º 13
0
 public BinaryExpressionVisitor(GatherVisitor issue)
 {
     this.issue = issue;
 }
 private StatementIssueCollector(GatherVisitor visitor, ReachabilityAnalysis reachability)
 {
     collectedStatements = new HashSet <Statement> ();
     this.visitor        = visitor;
     this.reachability   = reachability;
 }
Ejemplo n.º 15
0
 private StatementIssueCollector(GatherVisitor visitor, ReachabilityAnalysis reachability)
 {
     collectedStatements = new List <AstNode>();
     this.visitor        = visitor;
     this.reachability   = reachability;
 }
 public IEnumerable<CodeIssue> GetIssues(BaseRefactoringContext context)
 {
     var gv = new GatherVisitor(context);
     context.RootNode.AcceptVisitor(gv);
     return gv.CallFinder.FoundIssues;
 }
 public CRefVisistor(GatherVisitor parent)
 {
     this.parent = parent;
 }
 public CRefVisistor(GatherVisitor parent)
 {
     this.parent = parent;
 }
				public BinaryExpressionVisitor(GatherVisitor issue)
				{
					this.issue = issue;
				}
        public IEnumerable <CodeIssue> GetIssues(BaseRefactoringContext context)
        {
            var visitor = new GatherVisitor(context);

            return(visitor.GetIssues());
        }