Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- Object
- orion.breadcrumbs.BreadCrumbs
- orion.cm.Configuration
- orion.cm.ConfigurationAdmin
- orion.cm.ConfigurationProperties
- orion.cm.ManagedService
- orion.commandregistry.CommandRegistry
- orion.commandregistry.ParameterCollector
- orion.commands.Command
- orion.commands.CommandInvocation
- orion.commands.CommandParameter
- orion.commands.ParametersDescription
- orion.commands.URLBinding
- orion.compare.CompareCommandFactory
- orion.compare.CompareOptions
- orion.compare.CompareSyntaxHighlighter
- orion.compare.CompareView
- orion.compare.CompareViewOptions
- orion.compare.DiffProvider
- orion.compare.FileOptions
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compare.toggleableCompareView
- orion.compare.TwoWayCompareView
- orion.compareUtils
- orion.core.ContentType
- orion.core.ContentTypeService
- orion.Deferred
- orion.dialogs.DialogService
- orion.DiffTreeNavigator.DiffTreeNavigator
- orion.DiffTreeNavigator.inlineDiffBlockFeeder
- orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
- orion.edit.Dispatcher
- orion.editor.ActionDescription
- orion.editor.Annotation
- orion.editor.AnnotationIterator
- orion.editor.AnnotationModel
- orion.editor.AnnotationRuler
- orion.editor.AnnotationStyler
- orion.editor.AnnotationType
- orion.editor.AnnotationTypeList
- orion.editor.AsyncStyler
- orion.editor.BlurEvent
- orion.editor.ContentAssist
- orion.editor.ContentAssistMode
- orion.editor.ContentAssistProvider
- orion.editor.ContentAssistProvider.Context
- orion.editor.ContentAssistWidget
- orion.editor.ContextMenuEvent
- orion.editor.CssContentAssistProvider
- orion.editor.DestroyEvent
- orion.editor.EditOptions
- orion.editor.Editor
- orion.editor.EventTarget
- orion.editor.FindIterator
- orion.editor.FindOptions
- orion.editor.FocusEvent
- orion.editor.FoldingAnnotation
- orion.editor.HTMLContentAssistProvider
- orion.editor.InputManager
- orion.editor.JSTemplateContentAssistProvider
- orion.editor.KeyEvent
- orion.editor.LineNumberRuler
- orion.editor.LineStyleEvent
- orion.editor.ModelChangedEvent
- orion.editor.ModelChangingEvent
- orion.editor.ModifyEvent
- orion.editor.OverviewRuler
- orion.editor.Projection
- orion.editor.ProjectionTextModel
- orion.editor.regex
- orion.editor.Ruler
- orion.editor.ScrollEvent
- orion.editor.Selection
- orion.editor.SelectionEvent
- orion.editor.Style
- orion.editor.StyleRange
- orion.editor.StyleReadyEvent
- orion.editor.StyleReadyEvent#LineStyle
- orion.editor.TextMateStyler
- orion.editor.TextModel
- orion.editor.TextTheme
- orion.editor.TextView
- orion.editor.TextViewOptions
- orion.editor.ThemeChangedEvent
- orion.editor.ThemeStyleSheet
- orion.editor.UndoStack
- orion.editor.VerifyEvent
- orion.EventTarget
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.FileExplorer
- orion.explorer.FileExplorer.ModelHandler
- orion.explorer.NavigatorRenderer
- orion.explorer.SelectionRenderer
- orion.explorerNavHandler.ExplorerNavDict
- orion.explorerNavHandler.ExplorerNavHandler
- orion.extensionCommands
- orion.favorites.FavoritesService
- orion.fileClient.FileClient
- orion.fileCommands
- orion.fileUtils
- orion.form
- orion.git.GitCommitExplorer
- orion.git.GitLogExplorer
- orion.git.GitRepositoryExplorer
- orion.git.GitReviewRequestExplorer
- orion.git.GitService
- orion.git.GitStatusExplorer
- orion.git.widgets.OpenCommitDialog
- orion.globalCommands
- orion.highlight.SyntaxHighlighter
- orion.KeyBinding
- orion.KeySequence
- orion.KeyStroke
- orion.links.TextLinkService
- orion.log.LogService
- orion.metatype.AttributeDefinition
- orion.metatype.MetaTypeRegistry
- orion.metatype.ObjectClassDefinition
- orion.mirror.CodeMirrorStyler
- orion.mirror.Mirror
- orion.mirror.MirrorLineStyle
- orion.mirror.ModeApplier
- orion.navoutliner.NavigationOutliner
- orion.objects
- orion.operation
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.PageLinks
- orion.parametercollectors.CommandParameterCollector
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.progress.ProgressService
- orion.Promise
- orion.searchClient.Searcher
- orion.searches.SavedSearches
- orion.Searches.SearchBuilder
- orion.Searches.SearchList
- orion.searchResults.SearchResultsGenerator
- orion.searchUtils
- orion.searchUtils.SearchParams
- orion.selection.Selection
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.ServiceTracker
- orion.settings.Setting
- orion.settings.SettingsRegistry
- orion.shell.Command
- orion.shell.Parameter
- orion.shell.ParameterType
- orion.shell.Shell
- orion.sidebar.MiniNavViewMode
- orion.sidebar.Sidebar
- orion.sidebar.ViewMode
- orion.sites.SiteClient
- orion.sites.SiteConfiguration
- orion.sites.SiteEditor
- orion.sites.SiteService
- orion.sites.ViewOnSiteTree
- orion.status.StatusReportingService
- orion.tasks.TaskList
- orion.TreeModelIterator.TreeModelIterator
- orion.treetable.TableTree
- orion.uiUtils
- orion.URITemplate
- orion.util
- orion.webui.dialogs.OpenResourceDialog
- orion.webui.dialogs.OperationsDialog
- orion.webui.littlelib
- orion.widgets.Section
- orion.widgets.settings.SplitSelectionLayout
- orion.xhr
- orion.xhr.Result
- String

# Class orion.mirror.ModeApplier

Driver for CodeMirror modes.
Defined in: </shared/eclipse/e4/orion/I201306251555/plugins/org.eclipse.orion.client.editor/web/orion/editor/mirror.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.mirror.ModeApplier(model, mirror, options) A `ModeApplier` listens to text changes on a orion.editor.TextModel and drives a CodeMirror mode to calculate highlighting in response to the change.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addEventListener(type, listener, useCapture) Adds an event listener to this event target.
| destroy() Deactivates this ModeApplier and removes its listeners.
| dispatchEvent(evt) Dispatches the given event to the listeners added to this event target.
| getLineStyle(lineIndex)
| getLineStyles()
| getState(lineIndex) Returns the state we can use for parsing from the start of the `lineIndex`th line.
| highlight(startLine, endLine, partial) Highlights the given range of lines.
| highlightLater(startLine) Schedules a job that will begin highlighting from `startLine`.
| highlightLine(lineIndex, line, state) Highlights a single line.
| onHighlightDone() Called when some highlighting has been performed.
| removeEventListener(type, listener, useCapture) Removes an event listener from the event target.
| setMode(modeSpec, highlightImmediately) Sets the CodeMirror mode to be used for highlighting.
| toStyleRangesAndErrors(style, lineIndex) Converts a `MirrorLineStyle` to a orion.editor.StyleRange[].

Event Summary
Event Attributes | Event Name and Description
--- | ---
| HighlightEvent(start, end) Dispatched when the ModeApplier has updated the highlight info for a region of the file.

Class Detail
orion.mirror.ModeApplier(model, mirror, options)
A `ModeApplier` listens to text changes on a orion.editor.TextModel and drives a CodeMirror mode to calculate highlighting in response to the change. Clients can use the highlighting information to style a orion.editor.TextView.

After a change is made to the orion.editor.TextModel, ModeApplier immediately updates the highlighting information for a small portion of the file around where the change occurred. Successive portions of the file are updated by short jobs that run periodically to avoid slowing down the rest of the application.

A #event:HighlightEvent event is dispatched every time the ModeApplier updates highlighting information for a portion of the file. The event contains information about which lines were highlighted. The style for any highlighted line can be obtained by calling #getLineStyle.

Parameters:
{orion.editor.TextModel} model
  The text model to listen to.
{orion.mirror.Mirror} mirror
  The orion.mirror.Mirror to use for loading modes.
{Object} options Optional

Method Detail
addEventListener(type, listener, useCapture)
Adds an event listener to this event target.
Defined in: </shared/eclipse/e4/orion/I201306251555/plugins/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:
  #removeEventListener

destroy()
Deactivates this ModeApplier and removes its listeners.

dispatchEvent(evt)
Dispatches the given event to the listeners added to this event target.
Defined in: </shared/eclipse/e4/orion/I201306251555/plugins/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.

Parameters:
{Event} evt
  The event to dispatch.

{orion.mirror.MirrorLineStyle} getLineStyle(lineIndex)

Parameters:
{Number} lineIndex

Returns:
  {orion.mirror.MirrorLineStyle}

{orion.mirror.MirrorLineStyle[]} getLineStyles()

Returns:
  {orion.mirror.MirrorLineStyle[]}

{Object} getState(lineIndex)
Returns the state we can use for parsing from the start of the `lineIndex`th line.

Parameters:
{Number} lineIndex

Returns:
  {Object} The state. This object is safe to mutate.

highlight(startLine, endLine, partial)
Highlights the given range of lines.

Parameters:
{Number} startLine Optional
{Number} endLine Optional
{Boolean} partial Optional, Default: false
  If `true`, this function is assumed to be running as part of a larger operation, and will not dispatch a #event:HighlightEvent.

highlightLater(startLine)
Schedules a job that will begin highlighting from `startLine`. The job runs for a short amount of time, after which it dispatches a #event:HighlightEvent indicating its progress, and yields. Follow-up jobs are scheduled automatically if there's more highlighting to be done.

Parameters:
{Number} startLine

highlightLine(lineIndex, line, state)
Highlights a single line.

Parameters:
{Number} lineIndex
{Object} line
{Object} state
  The state to use for parsing from the start of the line.

onHighlightDone()
Called when some highlighting has been performed. Dispatches a #event:HighlightEvent.

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/I201306251555/plugins/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:
  #addEventListener

setMode(modeSpec, highlightImmediately)
Sets the CodeMirror mode to be used for highlighting. The mode must be registered with the orion.mirror.Mirror that this `ModeApplier` was created with. (The methods orion.mirror.Mirror#defineMode and orion.mirror.Mirror#defineMIME can be used to register a mode with a Mirror.)

Parameters:
{String} modeSpec
  Mode name or MIME type.
{Boolean} highlightImmediately Optional, Default: false

{orion.editor.StyleRange[][]} toStyleRangesAndErrors(style, lineIndex)
Converts a `MirrorLineStyle` to a orion.editor.StyleRange[].

Parameters:
{orion.mirror.MirrorLineStyle} style
  The line style to convert.
{Number} lineIndex Optional
  The line index of the line having the given style. If omitted, the returned orion.editor.StyleRange[] objects will have offsets relative to the line, not the document.

Returns:
  {orion.editor.StyleRange[][]} An array of 2 elements. The first element is an orion.editor.StyleRange[] giving the styles for the line.

  The second element is an orion.editor.StyleRange[] containing only those elements of the first array that represent syntax errors. (By CodeMirror convention, anything assigned the `"cm-error"` tag is assumed to be an error).

Event Detail
HighlightEvent(start, end)
Dispatched when the ModeApplier has updated the highlight info for a region of the file.

Parameters:
{Number} start
  The starting line index of the highlighted region.
{Number} end
  The ending line index of the highlighted region.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jun 25 2013 15:58:42 GMT-0400 (EDT)