Avalonedit Show syntax error
Asked Answered
S

1

8

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.

Songwriter answered 9/3, 2014 at 0:8 Comment(0)
C
10

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.

Codie answered 10/1, 2015 at 14:5 Comment(1)
How would you go about using Tooltips on text markers in your sample?Armenta

© 2022 - 2024 — McMap. All rights reserved.