Class orion.editor.ContentAssist
Can be attached to an Editor to display content assist suggestions.
Defined in: </shared/eclipse/e4/orion/I201107200200/plugins/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.editor.ContentAssist(editor, contentAssistId, serviceRegistry)
A ContentAssist will look for content assist providers in the service registry (if provided).
|
Method Attributes | Method Name and Description |
---|---|
addProvider(provider, name, pattern)
Adds a content assist provider.
|
|
cancel()
|
|
click(e)
|
|
enter()
|
|
getKeywords(prefix, buffer, selection)
|
|
init()
|
|
isActive()
|
|
lineDown()
|
|
lineUp()
|
|
setSelected(node)
|
|
showContentAssist(enable, event)
|
Class Detail
orion.editor.ContentAssist(editor, contentAssistId, serviceRegistry)
A ContentAssist will look for content assist providers in the service registry (if provided).
Alternatively, providers can be registered directly by calling #addProvider.
- Parameters:
- {orion.editor.Editor} editor
- The Editor to provide content assist for.
- {String|DomNode} contentAssistId
- The ID or DOMNode to use as the parent for content assist.
- {orion.ServiceRegistry} serviceRegistry Optional
- Service registry to use for looking up content assist providers. If this parameter is omitted, providers must instead be registered by calling #addProvider.
Method Detail
addProvider(provider, name, pattern)
Adds a content assist provider.
- Parameters:
- {Object} provider
- The provider object. See orion.contentAssist.CssContentAssistProvider for an example.
- {String} name
- Name for this provider.
- {String} pattern
- A regex pattern matching filenames that provider can offer content assist for.
cancel()
click(e)
- Parameters:
- e
enter()
{dojo.Deferred}
getKeywords(prefix, buffer, selection)
- Parameters:
- {String} prefix
- A prefix against which content assist proposals should be evaluated.
- {String} buffer
- The entire buffer being edited.
- {orion.textview.Selection} selection
- The current selection from the Editor.
- Returns:
- {dojo.Deferred} A future that will provide the keywords.
getSelected()
init()
isActive()
lineDown()
lineUp()
setSelected(node)
- Parameters:
- node
showContentAssist(enable, event)
- Parameters:
- {Boolean} enable
- {orion.textview.ModelChangedEvent} event Optional