/// <summary> /// Determines whether the current QuickFix is available for the violation. /// </summary> /// <remarks> /// Essentially to display the bulb item in the IDE the current ViolationID must match the name of the QuickFix Class. /// </remarks> /// <param name="cache"> /// Current Data Cache. /// </param> /// <returns> /// Whether the current QuickFix is available for the violation. /// </returns> public bool IsAvailable(JetBrains.Util.IUserDataHolder cache) { // use a more resiliant matching method - this caught me out // quite a bit while I was refactoring and debugging and wondering // why no bulb items were appearing if (this.Highlighting.CheckId.StartsWith("SA") || this.Highlighting.CheckId.StartsWith("BB")) { return(this.GetType().Name.Substring(2).StartsWith(this.Highlighting.CheckId.Substring(2))); } return(this.GetType().Name.StartsWith(this.Highlighting.CheckId)); }
public override bool IsAvailable(JetBrains.Util.IUserDataHolder cache) => true;
/// <summary> /// True if this QuickFix is available. /// </summary> /// <param name="cache"> /// The cache object to use. /// </param> /// <returns> /// The is available. /// </returns> public bool IsAvailable(JetBrains.Util.IUserDataHolder cache) { // TODO Not all StyleCop issues can be suppressed. We should check here and return false for those that cannot be handled. return(true); }
/// <summary> /// Determines whether the specified cache is available. /// </summary> /// <param name="cache"> /// The cache. /// </param> /// <returns> /// <c>True.</c> if the specified cache is available; otherwise, <c>False.</c> . /// </returns> public bool IsAvailable(JetBrains.Util.IUserDataHolder cache) { return(true); }