Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avalonedit Show syntax error

Tags:

avalonedit

when I develop a custom language IDE using avalonedit, I encountered a problem. I use regex to check the syntax, and it works as designed. However, I want to show the syntax error with wave text mark. I did search at google, yet the solution is either outdated or not feasible. Any ideas? Thanks ahead.

like image 640
Kuree Avatar asked Mar 09 '14 00:03

Kuree


1 Answers

AvalonEdit does not have this functionality built-in. However it provides all the infrastructure needed to implement it yourself. In the SharpDevelop IDE we have an implementation that should suit your needs.

You'll need some of the code from the SharpDevelop repository (https://github.com/icsharpcode/SharpDevelop/):

  • TextMarkerService, TextMarker
  • and its related interfaces and enums.

To make it easier for you, I have created a small sample application:

https://github.com/siegfriedpammer/AvalonEditSamples/tree/master/TextMarkerSample

It uses the AvalonEdit 5 nuget package and contains the classes mentioned above, plus a WPF Window to test it.

like image 197
Siegfried Avatar answered Nov 10 '22 07:11

Siegfried