/// <summary> /// Gets the actions for changing the highlight options for StyleCop rules. /// </summary> /// <param name="highlighting"> /// The current highlighting. /// </param> /// <param name="highlightingRange"> /// The current highlighting range. /// </param> /// <returns> /// The available actions. /// </returns> public IEnumerable <IDisableHighlightingAction> Actions(IHighlighting highlighting, DocumentRange highlightingRange) { StyleCopViolationBase violation = highlighting as StyleCopViolationBase; if (violation == null) { return(JB::JetBrains.Util.EmptyArray <IDisableHighlightingAction> .Instance); } string ruleID = violation.CheckId; string highlightID = HighlightingRegistering.GetHighlightID(ruleID); return(new IDisableHighlightingAction[] { new ChangeStyleCopRuleAction { HighlightID = highlightID, Text = "Inspection Options for \"" + violation.ToolTip + "\"" } }); }
/// <summary> /// Initializes a new instance of the SuppressStyleCopQuickFix class that can handle. /// </summary> /// <param name="highlight"> /// <see cref="StyleCopViolationWarning"/>that has been detected. /// </param> /// <param name="initialise"> /// True to initialize. /// </param> protected SuppressStyleCopQuickFix(StyleCopViolationBase highlight, bool initialise) { this.Violation = highlight; this.InitialiseBulbItems(); }
/// <summary> /// Initializes a new instance of the QuickFixBase class that can handle /// <see cref="StyleCopViolationBase"/>. /// </summary> /// <param name="highlight"> /// <see cref="StyleCopViolationBase"/>that has been detected. /// </param> /// <param name="initialise"> /// This value is not used, its only purpose is to differentiate /// the method signature. /// </param> protected QuickFixBase(StyleCopViolationBase highlight, bool initialise) { this.Violation = highlight; this.InitialiseIfRequired(); }