bralston

I have built a Language project that is based on the code in the IronPython 
sample.

When I call AddToErrorList with the appropriate codespan, the error is 
correctly reported in the Error List Task window, but the source code doesn't get 
highlighted (squiggley line underneath). Is there an extra step I need to 
take to get it to do this 

-Ben


Re: Visual Studio Extensibility IDEBuildLogger not highlighting errors when calling AddToErrorList

Dmitry Pavlov

Hi Ben,

IDEBuildLogger is not responsible for squiggley underlining the error spans.

You should use AuthoringScope.AddError method instead. Please have a look at AuthoringSink Class on MSDN.

Short quote here:

Errors

The base class uses an internal ArrayList called errors to contain the errors found during parsing. This list is displayed at the end of a full parsing operation by converting each error message into a task list item by calling CreateErrorTaskItem and adding it the Error List task window. These errors are also shown in the source file itself as squiggly lines under the code that is in error. This is handled automatically by the MPF classes. The AuthoringSink class constructor takes a parameter that specifies the maximum number of errors that can be retained by the class.






Re: Visual Studio Extensibility IDEBuildLogger not highlighting errors when calling AddToErrorList

bralston

Thank you Dmitry, that was exactly what I was looking for. BTW, I did search for "squiggly", but that nice bit of documentation was not one of the results.

-Ben





Re: Visual Studio Extensibility IDEBuildLogger not highlighting errors when calling AddToErrorList

bralston

Ok, I got ahead of myself there. Thats not quite what I needed. The authoringsink only comes into play for reporting parse errors from my LanguageService. I need to be able to show compile errors (from my custom CompileTask class) with squiggly lines. How do I do it from a compile task

Thanks again,

-Ben





Re: Visual Studio Extensibility IDEBuildLogger not highlighting errors when calling AddToErrorList

Dmitry Pavlov

Hi Ben,

AFAIK, there is no such possibility.






Re: Visual Studio Extensibility IDEBuildLogger not highlighting errors when calling AddToErrorList

bralston

For future reference, here is the thread where I posted sample code to make the MPF add squiggly lines to source compiler errors.

-Ben