Beispiel #1
0
 static IEnumerable <BaseCodeIssueProvider> EnumerateProvider(CodeIssueProvider p)
 {
     if (p.HasSubIssues)
     {
         return(p.SubIssues);
     }
     return(new BaseCodeIssueProvider[] { p });
 }
		public CodeIssueOptionsDialog (CodeIssueProvider inpector)
		{
			this.inpector = inpector;
			Build ();
			HasSeparator = false;

			labelInspectionTitle.Text = inpector.Title;
			var s = inpector.GetSeverity ();
			radiobuttonHide.Active = s == Severity.None;
			radiobuttonError.Active = s == Severity.Error;
			radiobuttonWarning.Active = s == Severity.Warning;
			radiobuttonHint.Active = s == Severity.Hint;
			radiobuttonSuggestion.Active = s == Severity.Suggestion;
			buttonOk.Clicked += HandleClicked;
			buttonCancel.Clicked += (sender, e) => Destroy ();
			Response += (o, args) => {
				if (args.ResponseId == ResponseType.Close)
					Destroy ();
			};
		}
        public CodeIssueOptionsDialog(CodeIssueProvider inpector)
        {
            this.inpector = inpector;
            Build();
            HasSeparator = false;

            labelInspectionTitle.Text = inpector.Title;
            var s = inpector.GetSeverity();

            radiobuttonHide.Active       = s == Severity.None;
            radiobuttonError.Active      = s == Severity.Error;
            radiobuttonWarning.Active    = s == Severity.Warning;
            radiobuttonHint.Active       = s == Severity.Hint;
            radiobuttonSuggestion.Active = s == Severity.Suggestion;
            buttonOk.Clicked            += HandleClicked;
            buttonCancel.Clicked        += (sender, e) => Destroy();
            Response += (o, args) => {
                if (args.ResponseId == ResponseType.Close)
                {
                    Destroy();
                }
            };
        }
Beispiel #4
0
        void AddIssue(ProjectFile file, CodeIssueProvider provider, CodeIssue r)
        {
            var issue = new IssueSummary {
                IssueDescription    = r.Description,
                Region              = r.Region,
                ProviderTitle       = provider.Title,
                ProviderDescription = provider.Description,
                ProviderCategory    = provider.Category,
                Severity            = provider.GetSeverity(),
                IssueMarker         = provider.IssueMarker,
                File              = file,
                Project           = file.Project,
                InspectorIdString = r.InspectorIdString
            };

            issue.Actions = r.Actions.Select(a => new ActionSummary {
                Batchable    = a.SupportsBatchRunning,
                SiblingKey   = a.SiblingKey,
                Title        = a.Title,
                Region       = a.DocumentRegion,
                IssueSummary = issue
            }).ToList();
            IssueSink.AddIssue(issue);
        }
		public static void AddProvider (CodeIssueProvider provider)
		{
			inspectors.Add (provider);
		}
Beispiel #6
0
		public InspectorResults (CodeIssueProvider inspector, DomRegion region, string message, Severity level, IssueMarker mark, params GenericFix[] fixes)
			: base (region, message, level, mark, fixes)
		{
			this.Inspector = inspector;
		}
Beispiel #7
0
		static IEnumerable<BaseCodeIssueProvider> EnumerateProvider (CodeIssueProvider p)
		{
			if (p.HasSubIssues)
				return p.SubIssues;
			return new BaseCodeIssueProvider[] { p };
		}
		void AddIssue (ProjectFile file, CodeIssueProvider provider, CodeIssue r)
		{
			var issue = new IssueSummary {
				IssueDescription = r.Description,
				Region = r.Region,
				ProviderTitle = provider.Title,
				ProviderDescription = provider.Description,
				ProviderCategory = provider.Category,
				Severity = provider.GetSeverity (),
				IssueMarker = provider.IssueMarker,
				File = file,
				Project = file.Project,
				InspectorIdString = r.InspectorIdString
			};
			issue.Actions = r.Actions.Select (a => new ActionSummary {
				Batchable = a.SupportsBatchRunning,
				SiblingKey = a.SiblingKey,
				Title = a.Title,
				Region = a.DocumentRegion,
				IssueSummary = issue
			}).ToList ();
			IssueSink.AddIssue (issue);
		}