[MonoDevelop] How to hook into editor warnings/errors?

Federico Di Gregorio fog at dndg.it
Sun Aug 17 09:49:03 UTC 2014


On 08/08/14 07:07, Michael Hutchinson wrote:
> That sounds right. Can you pastebin the addin xml somewhere?

It didn't worked on MD 4 but works on MD 5 so I was probably doing
something wrong. I have another question though.

dartanalyzer has a batch mode that can be used to keep it running in a
different thread (analisys of complex libraries can take some seconds
and keeping it running reduce the time) but how is one supposed to
update the "errors" in an opened document?

Thanks,

federico

> On 31 July 2014 11:38, Federico Di Gregorio <fog at dndg.it> wrote:
>>
>> I am trying to make MonoDevelop a little more friendly when editing Dart
>> files. Dart SDK has a nice tool, dartanalyzer, that reports errors,
>> warnings and hints in a simple, machine-parsable format. I'd like to use
>> that output to show hints in the right editor margin, just like the
>> CSharpBinding addin does but apparently I am missing something. Here is
>> what I tried:
>>
>> 1) Write a DartDocumentParser class that (right now) does almost nothing
>> and hook it at the /MonoDevelop/TypeSystem/Parser extension point.
>>
>> 2) From DartDocumentParser.Parse() return a DartParsedDocument (subclass
>> of DefaultParsedDocument) that using my dartanalyzer service calls
>> Add(new Error()) to add errors to the document.
>>
>> The problem is that Parse() is never invoken. The editor correctly
>> recognize the new MIME type and applies my basic syntax highlight
>> (hooked at /MonoDevelop/SourceEditor2/SyntaxModes) but nothing else.
>>
>> What am I missing here?




More information about the Monodevelop-list mailing list