|
org.eclipse.jface.text.source.projection
Class ProjectionAnnotationModel
java.lang.Object
org.eclipse.jface.text.source.AnnotationModel
org.eclipse.jface.text.source.projection.ProjectionAnnotationModel
-
All Implemented Interfaces:
-
ISynchronizable,
IAnnotationModel,
IAnnotationModelExtension,
IAnnotationModelExtension2
-
public class ProjectionAnnotationModel
- extends
AnnotationModel
A projection annotation model. It provides methods for modifying the
expansion state of the managed projection annotations.
Do not subclass. Use it as is.
-
Since:
- 3.0
-
Restriction:
- This class is not intended to be subclassed by clients.
Method Summary
|
void
|
collapse
(
Annotation annotation)
Changes the state of the given annotation to collapsed. |
boolean
|
collapseAll
(int offset,
int length)
Collapses all annotations that overlap with the given range and are collapsed. |
void
|
expand
(
Annotation annotation)
Changes the state of the given annotation to expanded. |
boolean
|
expandAll
(int offset,
int length)
Expands all annotations that overlap with the given range and are collapsed. |
protected boolean
|
expandAll
(int offset,
int length,
boolean fireModelChanged)
Expands all annotations that overlap with the given range and are collapsed. |
void
|
modifyAnnotations
(
Annotation[] deletions,
Map additions,
Annotation[] modifications)
Modifies the annotation model. |
void
|
toggleExpansionState
(
Annotation annotation)
Toggles the expansion state of the given annotation. |
Methods inherited from class org.eclipse.jface.text.source.
AnnotationModel
|
addAnnotation,
addAnnotation,
addAnnotationModel,
addAnnotationModelListener,
addPosition,
cleanup,
connect,
connected,
createAnnotationModelEvent,
disconnect,
disconnected,
fireModelChanged,
fireModelChanged,
getAnnotationIterator,
getAnnotationIterator,
getAnnotationIterator,
getAnnotationMap,
getAnnotationModel,
getAnnotationModelEvent,
getLockObject,
getModificationStamp,
getPosition,
modifyAnnotation,
modifyAnnotationPosition,
modifyAnnotationPosition,
removeAllAnnotations,
removeAllAnnotations,
removeAnnotation,
removeAnnotation,
removeAnnotationModel,
removeAnnotationModelListener,
removeAnnotations,
removePosition,
replaceAnnotations,
replaceAnnotations,
setLockObject
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
ProjectionAnnotationModel
public ProjectionAnnotationModel()
- Creates a new, empty projection annotation model.
collapse
public void collapse(
Annotation annotation)
- Changes the state of the given annotation to collapsed. An appropriate
annotation model change event is sent out.
-
-
Parameters:
-
annotation - the annotation
expand
public void expand(
Annotation annotation)
- Changes the state of the given annotation to expanded. An appropriate
annotation model change event is sent out.
-
-
Parameters:
-
annotation - the annotation
toggleExpansionState
public void toggleExpansionState(
Annotation annotation)
- Toggles the expansion state of the given annotation. An appropriate
annotation model change event is sent out.
-
-
Parameters:
-
annotation - the annotation
expandAll
public boolean expandAll(int offset,
int length)
- Expands all annotations that overlap with the given range and are collapsed.
-
-
Parameters:
-
offset - the range offset -
length - the range length
-
Returns:
-
true if any annotation has been expanded, false otherwise
collapseAll
public boolean collapseAll(int offset,
int length)
- Collapses all annotations that overlap with the given range and are collapsed.
-
-
Parameters:
-
offset - the range offset -
length - the range length
-
Returns:
-
true if any annotation has been collapse, false
otherwise -
Since:
- 3.2
expandAll
protected boolean expandAll(int offset,
int length,
boolean fireModelChanged)
- Expands all annotations that overlap with the given range and are collapsed. Fires a model change event if
requested.
-
-
Parameters:
-
offset - the offset of the range -
length - the length of the range -
fireModelChanged - true if a model change event
should be fired, false otherwise
-
Returns:
-
true if any annotation has been expanded, false otherwise
modifyAnnotations
public void modifyAnnotations(
Annotation[] deletions,
Map additions,
Annotation[] modifications)
- Modifies the annotation model.
-
-
Parameters:
-
deletions - the list of deleted annotations -
additions - the set of annotations to add together with their associated position -
modifications - the list of modified annotations
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.
|
|