| orion.edit.highlighter | ||
|---|---|---|
|
|
|
| orion.edit.contentAssist | orion.edit.validator | |
The orion.edit.highlighter service contributes syntax highlighting rules to the editor. A highlighter service provides a grammar, which is a declarative description of the structure of a language and what CSS classes the different structural pieces correspond to. The service also provides a list of file extensions. When the editor opens a file of a registered extension type, the grammar is applied to the file to obtain the styling.
None.
Implementations of orion.edit.highlighter must define the following attributes:
var provider = new eclipse.PluginProvider();
provider.registerServiceProvider("orion.edit.highlighter",
{
}, {
type : "grammar",
fileTypes : ["html", "htm"],
grammar: {
patterns: [
{ begin: "<!--",
end: "-->",
captures: { "0": "punctuation.definition.comment.html" },
contentName: "comment.block.html"
}
]
}
});
provider.connect();
The above example provides a grammar to be used for .html and .htm files. It will assign the CSS class punctuation-definition-comment-html to the <!-- and --> delimiters, and assign the CSS class comment-block-html to the text inside the delimiters. Consult this reference for a full description of the grammar format.
(Note that some aspects of the grammar format are not supported. See orion.editor.TextMateStyler in the Client API reference for a detailed explanation.)
|
|
|
| orion.edit.contentAssist | orion.edit.validator |