From 072b3e91b02d9568dc88f883e5e08ba0274b4a5e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 13 Jun 2013 17:46:27 +0200 Subject: [PATCH] Don't show icon in scrollbar for redundancy issues. --- .../CSharpBinding/Project/Src/Refactoring/IssueManager.cs | 5 ++++- src/Main/Base/Project/Dom/IModelCollection.cs | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs index 5a2b42a80d..5230459148 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/IssueManager.cs @@ -51,6 +51,7 @@ namespace CSharpBinding.Refactoring if (attributes.Length == 1) { this.Attribute = (IssueDescriptionAttribute)attributes[0]; defaultSeverity = this.Attribute.Severity; + IsRedundancy = this.Attribute.Category == IssueCategories.Redundancies; } else { SD.Log.Warn("Issue provider without attribute: " + ProviderType); } @@ -59,6 +60,7 @@ namespace CSharpBinding.Refactoring } public Severity CurrentSeverity { get; set; } + public bool IsRedundancy { get; set; } public IssueMarker MarkerType { get { return Attribute != null ? Attribute.IssueMarker : IssueMarker.Underline; } @@ -171,7 +173,8 @@ namespace CSharpBinding.Refactoring Color color = GetColor(this.Severity); color.A = 186; marker.MarkerColor = color; - marker.MarkerTypes = TextMarkerTypes.ScrollBarRightTriangle; + if (!Provider.IsRedundancy) + marker.MarkerTypes = TextMarkerTypes.ScrollBarRightTriangle; switch (Provider.MarkerType) { case IssueMarker.Underline: marker.MarkerTypes |= TextMarkerTypes.SquigglyUnderline; diff --git a/src/Main/Base/Project/Dom/IModelCollection.cs b/src/Main/Base/Project/Dom/IModelCollection.cs index f2dbbe33a8..85a8f6b60a 100644 --- a/src/Main/Base/Project/Dom/IModelCollection.cs +++ b/src/Main/Base/Project/Dom/IModelCollection.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Collections.Specialized; using System.Linq; namespace ICSharpCode.SharpDevelop.Dom