Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- Function
- Object
- orion.breadcrumbs.BreadCrumbs
- orion.cm.Configuration
- orion.cm.ConfigurationAdmin
- orion.cm.ConfigurationProperties
- orion.cm.ManagedService
- orion.commands.Command
- orion.commands.CommandKeyBinding
- orion.commands.CommandParameter
- orion.commands.CommandService
- orion.commands.ParametersDescription
- orion.commands.URLBinding
- orion.commonHTMLFragments
- orion.compare.DiffProvider
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compareUtils
- orion.contentAssist.CssContentAssistProvider
- orion.contentAssist.HTMLContentAssistProvider
- orion.core.ContentType
- orion.core.ContentTypeService
- orion.dialogs.DialogService
- orion.DiffTreeNavigator.DiffTreeNavigator
- orion.DiffTreeNavigator.inlineDiffBlockFeeder
- orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
- orion.edit.Dispatcher
- orion.editor.ContentAssist
- orion.editor.ContentAssistMode
- orion.editor.ContentAssistProvider
- orion.editor.ContentAssistProvider.Context
- orion.editor.ContentAssistWidget
- orion.editor.Editor
- orion.editor.JSTemplateContentAssistProvider
- orion.editor.regex
- orion.editor.StyleReadyEvent
- orion.editor.StyleReadyEvent#LineStyle
- orion.editor.TextMateStyler
- orion.EventTarget
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.SelectionRenderer
- orion.ExplorerNavHandler.ExplorerNavDict
- orion.explorers.explorer-table.FileExplorer
- orion.explorers.ExplorerNavHandler.ExplorerNavHandler
- orion.extensionCommands
- orion.favorites.FavoritesService
- orion.fileClient.FileClient
- orion.fileCommands
- orion.fileUtils
- 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.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.outliner.Outliner
- orion.outliner.OutlineService
- 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.searchClient.Searcher
- orion.searches.SavedSearches
- orion.Searches.SearchList
- orion.searchResults.SearchResultsGenerator
- orion.searchUtils
- 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.sites.SiteClient
- orion.sites.SiteConfiguration
- orion.sites.SiteService
- orion.sites.ViewOnSiteTree
- orion.status.StatusReportingService
- orion.tasks.TaskList
- orion.textview.ActionDescription
- orion.textview.Annotation
- orion.textview.AnnotationIterator
- orion.textview.AnnotationModel
- orion.textview.AnnotationRuler
- orion.textview.AnnotationStyler
- orion.textview.AnnotationType
- orion.textview.AnnotationTypeList
- orion.textview.BlurEvent
- orion.textview.ContextMenuEvent
- orion.textview.DestroyEvent
- orion.textview.EventTarget
- orion.textview.FindIterator
- orion.textview.FindOptions
- orion.textview.FocusEvent
- orion.textview.FoldingAnnotation
- orion.textview.KeyBinding
- orion.textview.LineNumberRuler
- orion.textview.LineStyleEvent
- orion.textview.ModelChangedEvent
- orion.textview.ModelChangingEvent
- orion.textview.ModifyEvent
- orion.textview.OverviewRuler
- orion.textview.Projection
- orion.textview.ProjectionTextModel
- orion.textview.Ruler
- orion.textview.ScrollEvent
- orion.textview.Selection
- orion.textview.SelectionEvent
- orion.textview.Style
- orion.textview.StyleRange
- orion.textview.TextModel
- orion.textview.TextView
- orion.textview.TextViewOptions
- orion.textview.UndoStack
- orion.textview.VerifyEvent
- orion.TreeModelIterator.TreeModelIterator
- orion.treetable.TableTree
- orion.uiUtils
- orion.util
- orion.widgets.OpenResourceDialog
- orion.widgets.Section
- orion.widgets.SiteEditor
- orion.xhr
- orion.xhr.Result
- String

# Class orion.textview.Ruler

This interface represents a ruler for the text view.

A Ruler is a graphical element that is placed either on the left or on the right side of the view. It can be used to provide the view with per line decoration such as line numbering, bookmarks, breakpoints, folding disclosures, etc.

There are two types of rulers: page and document. A page ruler only shows the content for the lines that are visible, while a document ruler always shows the whole content.

See:
orion.textview.LineNumberRuler
orion.textview.AnnotationRuler
orion.textview.OverviewRuler
orion.textview.TextView
orion.textview.TextView#addRuler
Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/rulers.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.textview.Ruler(annotationModel, rulerLocation, rulerOverview, rulerStyle) Constructs a new ruler.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addAnnotationType(type) Adds an annotation type to the receiver.
| getAnnotationModel() Returns the annotation model.
| getAnnotations(startLine, endLine) Returns the annotations for a given line range merging multiple annotations when necessary.
| getAnnotationsByType(annotationModel, start, end) Returns an array of annotations in the specified annotation model for the given range of text sorted by type.
| getAnnotationTypePriority(type) Gets the annotation type priority.
| getLocation() Returns the ruler location.
| getOverview() Returns the ruler overview type.
| getRulerStyle() Returns the style information for the ruler.
| getView() Returns the text view.
| getWidestAnnotation() Returns the widest annotation which determines the width of the ruler.
| isAnnotationTypeVisible(type) Returns whether the receiver shows annotations of the specified type.
| removeAnnotationType(type) Removes an annotation type from the receiver.
| setAnnotationModel(annotationModel) Sets the annotation model for the ruler.
| setMultiAnnotation(annotation) Sets the annotation that is displayed when a given line contains multiple annotations.
| setMultiAnnotationOverlay(annotation) Sets the annotation that overlays a line with multiple annotations.
| setView(view) Sets the view for the ruler.

Event Summary
Event Attributes | Event Name and Description
--- | ---
| onClick(lineIndex, e) This event is sent when the user clicks a line annotation.
| onDblClick(lineIndex, e) This event is sent when the user double clicks a line annotation.
| onMouseMove(lineIndex, e) This event is sent when the user moves the mouse over a line annotation.
| onMouseOut(lineIndex, e) This event is sent when the mouse pointer exits a line annotation.
| onMouseOver(lineIndex, e) This event is sent when the mouse pointer enters a line annotation.

Class Detail
orion.textview.Ruler(annotationModel, rulerLocation, rulerOverview, rulerStyle)
Constructs a new ruler.

The default implementation does not implement all the methods in the interface and is useful only for objects implementing rulers.

Parameters:
{orion.textview.AnnotationModel} annotationModel
  the annotation model for the ruler.
{String} rulerLocation Optional, Default: "left"
  the location for the ruler.
{String} rulerOverview Optional, Default: "page"
  the overview for the ruler.
{orion.textview.Style} rulerStyle Optional
  the style for the ruler.

Method Detail
addAnnotationType(type)
Adds an annotation type to the receiver.

Only annotations of the specified types will be shown by the receiver.

Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Parameters:
{Object} type
  the annotation type to be shown

See:
  #removeAnnotationType
  #isAnnotationTypeVisible

{orion.textview.AnnotationModel} getAnnotationModel()
Returns the annotation model.

Returns:
  {orion.textview.AnnotationModel} the ruler annotation model.

See:
  #setAnnotationModel

{orion.textview.Annotation[]} getAnnotations(startLine, endLine)
Returns the annotations for a given line range merging multiple annotations when necessary.

This method is called by the text view when the ruler is redrawn.

Parameters:
{Number} startLine
  the start line index
{Number} endLine
  the end line index

Returns:
  {orion.textview.Annotation[]} the annotations for the line range. The array might be sparse.

{orion.textview.Annotation[]} getAnnotationsByType(annotationModel, start, end)
Returns an array of annotations in the specified annotation model for the given range of text sorted by type.
Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Parameters:
{orion.textview.AnnotationModel} annotationModel
  the annotation model.
{Number} start
  the start offset of the range.
{Number} end
  the end offset of the range.

Returns:
  {orion.textview.Annotation[]} an annotation array.

getAnnotationTypePriority(type)
Gets the annotation type priority. The priority is determined by the order the annotation type is added to the receiver. Annotation types added first have higher priority.

Returns `0` if the annotation type is not added.

Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Parameters:
{Object} type
  the annotation type

See:
  #addAnnotationType
  #removeAnnotationType
  #isAnnotationTypeVisible

{String} getLocation()
Returns the ruler location.

Returns:
  {String} the ruler location, which is either "left" or "right".

See:
  #getOverview

{String} getOverview()
Returns the ruler overview type.

Returns:
  {String} the overview type, which is either "page" or "document".

See:
  #getLocation

{orion.textview.Style} getRulerStyle()
Returns the style information for the ruler.

Returns:
  {orion.textview.Style} the style information.

{orion.textview.TextView} getView()
Returns the text view.

Returns:
  {orion.textview.TextView} the text view.

See:
  #setView

{orion.textview.Annotation} getWidestAnnotation()
Returns the widest annotation which determines the width of the ruler.

If the ruler does not have a fixed width it should provide the widest annotation to avoid the ruler from changing size as the view scrolls.

This method is called by the text view when the ruler is redrawn.

Returns:
  {orion.textview.Annotation} the widest annotation.

See:
  #getAnnotations

{Boolean} isAnnotationTypeVisible(type)
Returns whether the receiver shows annotations of the specified type.
Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Parameters:
{Object} type
  the annotation type

Returns:
  {Boolean} whether the specified annotation type is shown

See:
  #addAnnotationType
  #removeAnnotationType

removeAnnotationType(type)
Removes an annotation type from the receiver.
Defined in: </shared/eclipse/e4/orion/I201210191304/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Parameters:
{Object} type
  the annotation type to be removed

See:
  #addAnnotationType
  #isAnnotationTypeVisible

setAnnotationModel(annotationModel)
Sets the annotation model for the ruler.

Parameters:
{orion.textview.AnnotationModel} annotationModel
  the annotation model.

See:
  #getAnnotationModel

setMultiAnnotation(annotation)
Sets the annotation that is displayed when a given line contains multiple annotations. This annotation is used when there are different types of annotations in a given line.

Parameters:
{orion.textview.Annotation} annotation
  the annotation for lines with multiple annotations.

See:
  #setMultiAnnotationOverlay

setMultiAnnotationOverlay(annotation)
Sets the annotation that overlays a line with multiple annotations. This annotation is displayed on top of the computed annotation for a given line when there are multiple annotations of the same type in the line. It is also used when the multiple annotation is not set.

Parameters:
{orion.textview.Annotation} annotation
  the annotation overlay for lines with multiple annotations.

See:
  #setMultiAnnotation

setView(view)
Sets the view for the ruler.

This method is called by the text view when the ruler is added to the view.

Parameters:
{orion.textview.TextView} view
  the text view.

Event Detail
onClick(lineIndex, e)
This event is sent when the user clicks a line annotation.

Parameters:
{Number} lineIndex
  the line index of the annotation under the pointer.
{DOMEvent} e
  the click event.

onDblClick(lineIndex, e)
This event is sent when the user double clicks a line annotation.

Parameters:
{Number} lineIndex
  the line index of the annotation under the pointer.
{DOMEvent} e
  the double click event.

onMouseMove(lineIndex, e)
This event is sent when the user moves the mouse over a line annotation.

Parameters:
{Number} lineIndex
  the line index of the annotation under the pointer.
{DOMEvent} e
  the mouse move event.

onMouseOut(lineIndex, e)
This event is sent when the mouse pointer exits a line annotation.

Parameters:
{Number} lineIndex
  the line index of the annotation under the pointer.
{DOMEvent} e
  the mouse out event.

onMouseOver(lineIndex, e)
This event is sent when the mouse pointer enters a line annotation.

Parameters:
{Number} lineIndex
  the line index of the annotation under the pointer.
{DOMEvent} e
  the mouse over event.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Oct 19 2012 13:08:15 GMT-0400 (EDT)