Language Designer Suggestions

SyntaxEditor for WPF Forum

Posted 14 years ago by Phil Devaney - Senior Software Engineer, Serck Controls Ltd
Version: 10.2.0531
I have a number of suggestions for the Language Designer to make it easier to integrate the generated code into a C# project.

The relatively simple ones:
1. An option to name the generated files *.g.cs or *.Designer.cs, so they can be ignored by StyleCop.
2. An option to make some or all of the generated classes internal.
3. Add a partial method to the generated SyntaxLanguage called RegisterAdditionalServices or similar, and call this method in the constructor. I can then add an implementation in a non-generated class to register services such as a parser & completion provider, without worrying about the code being lost if the file is regenerated.

And the more complicated one :):
4. Write a custom build tool so that a langdef file can be added to a csproj or vbproj, and auto-generate the language classes, similar to the way a resx file generates the strongly-typed resource class. If you wanted to go all out, you could create a Visual Studio extension so the langdef file can be edited inside VS!


Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Phil,

Thanks for the suggestions, we've added them to our TODO list. It may make sense to put the .g in the name for all of them as they are generated files and it would help indicate to you which are generated and which are not. Also if we did that then the non-.g versions could be partial class implementations of your own.

Actipro Software Support

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

For the third suggestion, you might find it useful to subclass the generated SyntaxLanguage, and then use the derived one in your application. The derived class constructor would need to call the base class constructor, and it also sets up any additional services that are required.

Actipro Software Support

Posted 10 years ago by Matt Gerrans

I guess there is still no command line tool for generating the .g.cs files?

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

Hi Matt,

Sorry, no we never made a command line tool.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.