Class Index | File Index

Classes


Class orion.editor.AnnotationTypeList

This represents an interface of prioritized annotation types.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new AnnotationTypeList object.
Method Summary
Method Attributes Method Name and Description
 
addAnnotationType(type, priority)
Adds an annotation type to the receiver.
 
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.
 
setAnnotationTypeVisible(type, visible)
Sets whether annotations of the given annotation type are visble.
Class Detail
orion.editor.AnnotationTypeList()
Constructs a new AnnotationTypeList object.
Method Detail
addAnnotationType(type, priority)
Adds an annotation type to the receiver.

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

If the priority is not specified, the annotation type will be added to the end of the receiver's list (lowest pririoty).

Parameters:
{Object} type
the annotation type to be shown
{Number} priority
the priority for the annotation type
See:
orion.editor.AnnotationTypeList#removeAnnotationType
orion.editor.AnnotationTypeList#isAnnotationTypeVisible
orion.editor.AnnotationTypeList#getAnnotationTypePriority

{orion.editor.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.editor.AnnotationModel} annotationModel
the annotation model.
{Number} start
the start offset of the range.
{Number} end
the end offset of the range.
Returns:
{orion.editor.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:
orion.editor.AnnotationTypeList#addAnnotationType
orion.editor.AnnotationTypeList#removeAnnotationType
orion.editor.AnnotationTypeList#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:
orion.editor.AnnotationTypeList#addAnnotationType
orion.editor.AnnotationTypeList#removeAnnotationType

removeAnnotationType(type)
Removes an annotation type from the receiver.
Parameters:
{Object} type
the annotation type to be removed
See:
orion.editor.AnnotationTypeList#addAnnotationType
orion.editor.AnnotationTypeList#isAnnotationTypeVisible

setAnnotationTypeVisible(type, visible)
Sets whether annotations of the given annotation type are visble. By default all annotations added to the receiver are visible.
Parameters:
{Object} type
{Boolean} visible
Since:
14.0

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 29 2017 14:37:20 GMT-0400 (EDT)