Assembly references syntax highlight

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 11 months ago by Mike
Version: 18.1.0670
Avatar

Hi,

I'm trying to get the syntax highlight to work but it only highlights all common names.

editor.Language = new CSharpSyntaxLanguage();
var Project = editor.Language.CSharpSyntaxLanguage.GetService<IProjectAssembly>();

editor.Language.RegisterProjectAssembly(Project);

Project.AssemblyReferences.AddMsCorLib();
Project.AssemblyReferences.AddFrom("C:\\test.dll");

 The test.dll assembly contains a class called 'TestClass'.

If I now paste the following code in the editor, TestClass does not get highlighted.

class Test
{
	var test = new TestClass(); //no syntaxhighlight
	test.write(this.Column); //'this.' is highlighted
}

 What am I missing?

Comments (1)

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

That is correct, it doesn't currently support the syntax highlighting of resolved type names.  That's something we'd like to do but it requires running the parser resolver on every identifier in the document and then syncing that data up with the syntax highlighting, which is a big performance hit.  We haven't found a fast way to do that yet.  I will add your request with the related TODO item.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) 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.