In This Article

Getting Started

This topic covers essential information about using the application, such as how to start it, what is a language project, how to open/save language projects, use the ribbon user interface and Properties tool window, and get started defining the general properties for a language.

Running the Application

Go to your Windows' Programs menu group for the WPF controls and click the Run SyntaxEditor Language Designer menu item. This will run the application. If the application previously had a language project open, it would be reopened. Otherwise, a Backstage will be opened with several options for creating a new language project or opening an existing one.

Note

If you do not see the menu item to run the application, ensure that the option to install it is checked during the WPF controls setup process.

Language Projects vs. Language Definitions

It is important to understand the difference between language project files (.langproj) and language definition files (.langdef). Language project files are what can be loaded and edited by the Language Designer application. The language project stores a lot of information about your language such as lexer configuration, classification types, etc. Based on the information about your language stored in a language project, you can generate language-related code that can be included in your application's project. Language projects themselves are not intended to be distributed with your application, only the code generated by them is.

Language definitions, on the other hand, are one output option when performing code generation. The other option being the generation of pure C#/VB language-related code. Language definitions are essentially a subset of the data stored in the language project that can be distributed with an application and loaded at run-time to instantly configure a language.

Again, language definitions are just one option for working with a language at run-time with your code. They are nice because they are portable and can easily be shared or tweaked. More information on language definitions and the difference between them and pure C#/VB code generation is given in the Code Generation topic.

Language Project File Operations

The Language Designer supports all the basic file operations for working with language projects. These file operations are always available on the ribbon's Backstage menu.

  • The New action (Ctrl+N) creates a new language project and opens the General Properties configuration pane.
  • The Open action (Ctrl+O) opens an existing language project that you have already created.
  • The Save action (Ctrl+S) saves the currently open language project.
  • The Save As action saves the currently open language project, but as a different file.
  • The Close action closes the currently open language project.

A list of recently opened projects is also available on the Open tab on the Backstage menu. Click on a recently-opened project to reopen it.

Whenever an action is taken that will close a currently open language project, you will be prompted as to whether you wish to save the project or not before continuing.

Tip

Many of the actions on the Backstage menu, like Save, can also be added to the Quick Access Toolbar (QAT) for one-click access. Click the QAT's Customize button to toggle the visibility of common commands. Right-click any command in the ribbon and select Add to Quick Access Toolbar for additional options.

Importing a SyntaxEditor 4.0 for WinForms Dynamic Language XML Definition

To help aid in the transition of some of our WinForms customers to newer platforms, we have added a feature that allows you to import a SyntaxEditor 4.0 for WinForms dynamic language XML definition. Most of the data in the definition will be converted over and imported into a new language project.

To access this feature, choose the Import SE4 Definition action from the Home tab on the Backstage menu.

The Ribbon User Interface

The ribbon user interface in the Language Designer provides access to all the application's features.

Screenshot

The Language Designer's ribbon user interface

The Actions group contains numerous actions that can be used whenever lists are presented in a configuration pane. Certain actions enable/disable based on the selection within the list.

The Project Windows group contains actions that, when clicked, will open the various configuration panes used to store data about your language.

The Code Generation group has actions that are related to building your project (error checking) and performing code generation.

The Debugging group has actions for doing a live test or opening the LL Parser Debugger.

The Properties Tool Window

The Properties tool window is used throughout the application. It will auto-populate when focus enters many of the configuration panes. In the scenario where configuration panes contain a list, it will often show the properties of the selected list item. Most lists support multi-selection allowing you to see/change the properties of more than one object at a time.

General Properties Configuration Pane

The General Properties configuration pane can be opened by clicking General Properties on the ribbon. This configuration pane allows you to set some high-level properties for your language. All language projects should set this data first.

The language key is the name of the language that will be used in type names, so it must conform to identifier naming requirements for C# and VB. This means that say we were making a language project for C#, we would set the language key to be CSharp since the # character cannot be used in identifier names.

The Description is only used in comments, so any value can be used. If we were developing a C# language, here is where we would enter C#.

The Creator indicates the name of the company that created the language project. The Copyright is a place to put a copyright line for the language project data. Both items, if included, are output during the code generation phase and help protect your intellectual property.

The Example text is where you can define a code snippet for the language that is used in the Language Designer application when performing a "Live Test". If desired, it can also be loaded and used at run-time for previewing how a language is syntax highlighted.