Class Index | File Index

Classes


Class orion.editor.ContentAssist

Provides content assist for a TextView.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a ContentAssist for a TextView.
Method Summary
Method Attributes Method Name and Description
 
activate(providerInfoArray, autoTriggered)
 
addEventListener(type, listener, useCapture)
Adds an event listener to this event target.
 
apply(proposal)
Applies the given proposal to the TextView.
 
Computes the proposals at the TextView's current caret offset.
 
 
Dispatches the given event to the listeners added to this event target.
 
 
 
handleError(error)
 
 
isDeactivatingChange(event, selectionEvent)
 
removeEventListener(type, listener, useCapture)
Removes an event listener from the event target.
 
 
setAutoTriggerEnabled(enableAutoTrigger)
Sets whether or not automatic content assist triggering is enabled.
 
setEditorContextProvider(editorContextProvider)
Sets the provider that will be invoked to generate the Editor Context service and options to any content assist providers that implement the v4.0 content assist API.
 
setMode(mode)
 
setProgress(progress)
Sets the progress handler that will display progress information, if any are generated by content assist providers.
 
Sets the array of content assist provider info that this ContentAssist will consult to obtain proposals and automatic triggers.
 
setProviders(providers)
Sets the content assist providers that this ContentAssist will consult to obtain proposals.
 
setStyleAccessor(styleAccessor)
Event Summary
Event Attributes Event Name and Description
 
Dispatched when a ContentAssist is about to be activated.
 
Dispatched when a ContentAssist is about to be deactivated.
 
Dispatched when a ContentAssist has applied a proposal.
 
Dispatched whenever a ContentAssist has obtained proposals from its providers.
Class Detail
orion.editor.ContentAssist(textView)
Creates a ContentAssist for a TextView. A ContentAssist consults a set of orion.editor.ContentAssistProviders to obtain proposals for text that may be inserted into a TextView at a given offset.

A ContentAssist is generally activated by its TextView action, at which point it computes the set of proposals available. It will re-compute the proposals in response to subsequent changes on the TextView (for example, user typing) for as long as the ContentAssist is active. A proposal may be applied by calling #apply, after which the ContentAssist becomes deactivated. An active ContentAssist may be deactivated by calling #deactivate.

A ContentAssist dispatches events when it becomes activated or deactivated, and when proposals have been computed.

Parameters:
{orion.editor.TextView} textView
The TextView to provide content assist for.
Method Detail
activate(providerInfoArray, autoTriggered)
Parameters:
providerInfoArray
autoTriggered

addEventListener(type, listener, useCapture)
Adds an event listener to this event target.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
Parameters:
{String} type
The event type.
{Function|EventListener} listener
The function or the EventListener that will be executed when the event happens.
{Boolean} useCapture Optional, Default: false
true if the listener should be trigged in the capture phase.
See:
orion.editor.EventTarget#removeEventListener

{Boolean} apply(proposal)
Applies the given proposal to the TextView.
Parameters:
{Object} proposal Optional
Returns:
{Boolean} true if the proposal was applied; false if no proposal was provided.

computeProposals()
Computes the proposals at the TextView's current caret offset.

deactivate()

dispatchEvent(evt)
Dispatches the given event to the listeners added to this event target.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
Parameters:
{Event} evt
The event to dispatch.

filterProposals(event)
Parameters:
event

{orion.editor.TextView} getTextView()
Returns:
{orion.editor.TextView}

handleError(error)
Parameters:
error

{Boolean} isActive()
Returns:
{Boolean}

{Boolean} isDeactivatingChange(event, selectionEvent)
Parameters:
{orion.editor.ModelChangingEvent} event
selectionEvent
Returns:
{Boolean} true if the event describes a change that should deactivate content assist.

removeEventListener(type, listener, useCapture)
Removes an event listener from the event target.

All the parameters must be the same ones used to add the listener.


Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
Parameters:
{String} type
The event type
{Function|EventListener} listener
The function or the EventListener that will be executed when the event happens.
{Boolean} useCapture Optional, Default: false
true if the listener should be trigged in the capture phase.
See:
orion.editor.EventTarget#addEventListener

resetProviderInfoArray()

setAutoTriggerEnabled(enableAutoTrigger)
Sets whether or not automatic content assist triggering is enabled.
Parameters:
{Boolean} enableAutoTrigger

setEditorContextProvider(editorContextProvider)
Sets the provider that will be invoked to generate the Editor Context service and options to any content assist providers that implement the v4.0 content assist API.
Parameters:
{Object} editorContextProvider

setMode(mode)
Parameters:
mode

setProgress(progress)
Sets the progress handler that will display progress information, if any are generated by content assist providers.
Parameters:
progress

setProviderInfoArray(providers)
Sets the array of content assist provider info that this ContentAssist will consult to obtain proposals and automatic triggers.
Parameters:
{Array { provider: orion.editor.ContentAssistProvider|id: {String}|charTriggers: {RegExp}|excludedStyles: {RegExp} }} providers
The providers.

setProviders(providers)
Sets the content assist providers that this ContentAssist will consult to obtain proposals.
Parameters:
{orion.editor.ContentAssistProvider[]} providers
The providers.

setStyleAccessor(styleAccessor)
Parameters:
styleAccessor
Event Detail
ActivatingEvent()
Dispatched when a ContentAssist is about to be activated.

DeactivatingEvent()
Dispatched when a ContentAssist is about to be deactivated.

ProposalAppliedEvent()
Dispatched when a ContentAssist has applied a proposal.

This event's data field gives information about the proposal that was applied.


ProposalsComputedEvent()
Dispatched whenever a ContentAssist has obtained proposals from its providers.

This event's data field gives information about the proposals.


Documentation generated by JsDoc Toolkit 2.4.0 on Tue Apr 01 2014 22:58:23 GMT-0400 (EDT)