Assembly references syntax highlight

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 2 years 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 (3)

Posted 2 years 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 (v2019.1 build 0683) was released 1 month ago, which was before the next post in this thread.
Posted 1 month ago by horato
Avatar

Hello, is there any progress on this issue? Thank you

Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

No, I'm sorry but we haven't worked on that particular feature.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.