Class Index | File Index

Classes


Class orion.textview.AnnotationStyler

This object represents a styler for annotation attached to a text view.
Defined in: </shared/eclipse/e4/orion/I201301232230/plugins/org.eclipse.orion.client.editor/web/orion/textview/annotations.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new styler for annotations.
Method Summary
Method Attributes Method Name and Description
 
Adds an annotation type to the receiver.
 
Destroys the styler.
 
getAnnotationsByType(annotationModel, start, end)
Returns an array of annotations in the specified annotation model for the given range of text sorted by type.
 
Gets the annotation type priority.
 
Returns whether the receiver shows annotations of the specified type.
 
Removes an annotation type from the receiver.
Class Detail
orion.textview.AnnotationStyler(view, view)
Constructs a new styler for annotations.
Parameters:
{orion.textview.TextView} view
The styler view.
{orion.textview.AnnotationModel} view
The styler annotation model.
Method Detail
addAnnotationType(type)
Adds an annotation type to the receiver.

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

Parameters:
{Object} type
the annotation type to be shown
See:
#removeAnnotationType
#isAnnotationTypeVisible

destroy()
Destroys the styler.

Removes all listeners added by this styler.


{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.
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.

Parameters:
{Object} type
the annotation type
See:
#addAnnotationType
#removeAnnotationType
#isAnnotationTypeVisible

{Boolean} isAnnotationTypeVisible(type)
Returns whether the receiver shows annotations of the specified type.
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.
Parameters:
{Object} type
the annotation type to be removed
See:
#addAnnotationType
#isAnnotationTypeVisible

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 23 2013 22:37:25 GMT-0500 (EST)