2

I have a custom attribute...

[System.AttributeUsage(System.AttributeTargets.All)]
public class Refactor : System.Attribute
{
    private string _message;

    public Refactor()
    {
        _message = string.Empty;
    }

    public Refactor(string message)
    {
        _message = message;
    }               
}

Applied to

[Refactor("this should be less rubbish")]
public virtual void RubbishMethod()    
{    
…    
}

Now when someone makes a call to RubbishMethod I'd like the IDE (vs2008) to underline that call in a deep brown colour, similar to if I mark as Obsolete you get a green wave line. Is this possible? I've been racking my brain and hitting the google but I can't find how and where to do this.

gingerbreadboy
  • 7,386
  • 5
  • 36
  • 62

1 Answers1

1

You'd have to write a VS extension. You would need to create a Classifier. The Ook! language extension has a good sample of making classifiers.

justin.m.chase
  • 13,061
  • 8
  • 52
  • 100