In This Article

Delimiter Auto-Completer

A delimiter auto-completer can insert an end delimiter when its related start delimiter is typed. This service is used to drive the Delimiter Auto-Completion feature.

Basic Concepts

Delimiter auto-completers are classes implementing IDelimiterAutoCompleter that can auto-complete an end delimiter when a start delimiter is typed by the end user. See the Delimiter Auto-Completion topic for details on this feature and how the built-in DelimiterAutoCompleter works.

Registering with a Language

Any object that implements IDelimiterAutoCompleter can be associated with a syntax language by registering it as an IDelimiterAutoCompleter service on the language.

This code creates a DelimiterAutoCompleter object and registers it with the syntax language that is already declared in the language variable:

DelimiterAutoCompleter completer = new DelimiterAutoCompleter();
language.RegisterDelimiterAutoCompleter(completer);
Note

The SyntaxLanguageExtensions.RegisterDelimiterAutoCompleter method in the code snippet above is a helper extension method that gets added to ISyntaxLanguage objects when the ActiproSoftware.Text namespace is imported. See the Service Locator Architecture topic for details on registering and retrieving various service object instances, both via extension methods and generically, as there are some additional requirements for using the extension methods.