Пример #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 ();
			};
		}
Пример #3
0
        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();
                }
            };
        }
Пример #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);
        }
Пример #5
0
		public static void AddProvider (CodeIssueProvider provider)
		{
			inspectors.Add (provider);
		}
Пример #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;
		}
Пример #7
0
		static IEnumerable<BaseCodeIssueProvider> EnumerateProvider (CodeIssueProvider p)
		{
			if (p.HasSubIssues)
				return p.SubIssues;
			return new BaseCodeIssueProvider[] { p };
		}
Пример #8
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);
		}