Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  IAnnotationModel, IAnnotationModelExtension, ISynchronizable

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

Field Summary

Fields inherited from class org.eclipse.jface.text.source.AnnotationModel
`fAnnotationModelListeners, fAnnotations, fDocument`

Constructor Summary
`ProjectionAnnotationModel()` Creates a new, empty projection annotation model.

Method Summary
`void` | `collapse(Annotation annotation)` Changes the state of the given annotation to 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, 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`

Constructor Detail

### ProjectionAnnotationModel

    public ProjectionAnnotationModel()

  Creates a new, empty projection annotation model.

Method Detail

### 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

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.