Class Index | File Index

Classes


Class eclipse.Ruler

This interface represents a ruler for the editor.

A Ruler is a graphical element that is placed either on the left or on the right side of the editor. It can be used to provide the editor 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:
eclipse.Editor
eclipse.Editor#addRuler


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

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Returns the indices of the lines that have decoration.
 
getHTML(lineIndex)
Returns the HTML content for the decoration of a given line.
 
Returns the ruler location.
 
Returns the ruler overview type.
 
getStyle(lineIndex)
Returns the CSS styling information for the decoration of a given line.
Event Summary
Event Attributes Event Name and Description
 
onClick(lineIndex, e)
This event is sent when the user clicks a line decoration.
 
onDblClick(lineIndex, e)
This event is sent when the user double clicks a line decoration.
Class Detail
eclipse.Ruler()
Method Detail
{Number[]} getAnnotations()
Returns the indices of the lines that have decoration.

This function is only called for rulers with "document" overview type.

Returns:
{Number[]} an array of line indices.

{String} getHTML(lineIndex)
Returns the HTML content for the decoration of a given line.

If the line index is -1, the HTML content for the decoration that determines the width of the ruler should be returned.

Parameters:
{Number} lineIndex
Returns:
{String} the HTML content for a given line, or generic line.
See:
#getStyle

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

{String} getOverview()
Returns the ruler overview type.
Returns:
{String} the overview type, which is either "page" or "document".
See:
#getLocation

{eclipse.Style} getStyle(lineIndex)
Returns the CSS styling information for the decoration of a given line.

If the line index is -1, the CSS styling information for the decoration that determines the width of the ruler should be returned. If the line is undefined, the ruler styling information should be returned.

Parameters:
{Number} lineIndex
Returns:
{eclipse.Style} the CSS styling for ruler, given line, or generic line.
See:
#getHTML
Event Detail
onClick(lineIndex, e)
This event is sent when the user clicks a line decoration.
Parameters:
{Number} lineIndex
the line index of the clicked decoration
{DOMEvent} e
the click event

onDblClick(lineIndex, e)
This event is sent when the user double clicks a line decoration.
Parameters:
{Number} lineIndex
the line index of the double clicked decoration
{DOMEvent} e
the double click event

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 02 2011 14:09:18 GMT-0400 (EDT)