| orion.edit.contentAssist | ||
|---|---|---|
|
|
|
| orion.edit.command | orion.edit.highlighter | |
The orion.edit.contentAssist service contributes content assist providers to the editor. A content assist provider produces suggestions for text that may be inserted into the editor at a given point. Providers are invoked when the user triggers the "content assist" action by pressing Ctrl+Space in the editor.
Implementations of orion.edit.contentAssist must define the following function:
Implementations of orion.edit.contentAssist must define the following attributes:
var provider = new eclipse.PluginProvider();
provider.registerServiceProvider("orion.edit.contentAssist",
{
getKeywords: function(prefix, buffer, selection) {
return [ "break", "case", "catch", "continue", "debugger", "default", "delete", "do", "else",
"finally", "for", "function", "if", "in", "instanceof", "new", "return", "switch", "this",
"throw", "try", "typeof", "var", "void", "while", "with" ];
}
},
{
name: "JavaScript content assist",
pattern: "\\.js$"
});
provider.connect();
The above example provides content assist suggestions for files whose name ends in .js. It offers JavaScript keywords as suggestions.
|
|
|
| orion.edit.command | orion.edit.highlighter |