문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top