SyntaxEditor lexing and parsing without windows references

SyntaxEditor for WPF Forum

Posted 4 years ago by Matt Yaeger
Version: 16.1.0631
Avatar

On your website it says SyntaxEditor document and language have been separated from UI (http://www.actiprosoftware.com/products/controls/wpf/syntaxeditor/text).  When I look at the generated code, specifically the ClassificationTypeProvider, .I see a reference to System.Windows.Media.  This reference seems to be a UI reference.  How do I separate out the windows references from the generated code so I can lex and parse with no windows references?  I am attempting to see if I can run my code on .NET core.

 

Thanks

Comments (4)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Matt,

While our assemblies don't target .NET Core at this time, it's likely that the core Text.* ones would port over since they don't contain any UI platform code themselves.

As for generated classification type providers, you would need to strip out all refs to the IHighlightingStyleRegistry and in the properties that return IClassificationType, just create the instance as needed since there is no registry to do the initial lookup on.  That should remove all UI platform refs from that class.


Actipro Software Support

Posted 4 years ago by Matt Yaeger
Avatar

I think I understand.  Should I keep 2 separate sets of gerenerated .cs files?  I mean I will still use the WPF UI control for my language in another app so I would need the highligting there, wouldn't I?  Or is there a another way?

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

A lot of what is generated would still be platform agnostic and could be shared.  The classification type provider is a different story since it does reference the highlighting style registry.  So you would need two copies of that, one per platform.  Likewise the generated SyntaxLanguage references UI pieces too and you'd need two copies of that as well.


Actipro Software Support

Posted 4 years ago by Matt Yaeger
Avatar

Right, no need to copy them all.  I'll give that a try.

 

Thanks

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.