Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager Class Reference

List of all members.

Public Member Functions

 ContributionAnnotationManager (ISarosSession sarosSession, IPreferenceStore preferenceStore)
void insertAnnotation (IAnnotationModel model, int offset, int length, User source)
void splitAnnotation (final IAnnotationModel model, final int offset)
void refreshAnnotations (IAnnotationModel model)
void dispose ()

Static Package Attributes

static final int MAX_HISTORY_LENGTH = 20

Detailed Description

This class keeps a history of added ContributionAnnotations and removes old ones.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager.ContributionAnnotationManager ( ISarosSession  sarosSession,
IPreferenceStore  preferenceStore 
)

Member Function Documentation

void de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager.dispose ( )
void de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager.insertAnnotation ( IAnnotationModel  model,
int  offset,
int  length,
User  source 
)

Inserts a contribution annotation to given model if there is not already a contribution annotation at given position. This method should be called after the text has changed.

Parameters:
modelto add the annotation to.
offsetstart of the annotation to add.
lengthlength of the annotation.
sourceof the annotation.
void de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager.refreshAnnotations ( IAnnotationModel  model)

Refreshes all contribution annotations in the model by removing and reinserting them.

Parameters:
modelthe annotation model that should be refreshed
void de.fu_berlin.inf.dpp.editor.internal.ContributionAnnotationManager.splitAnnotation ( final IAnnotationModel  model,
final int  offset 
)

Splits the contribution annotation at given position, so that the following text change won't expand the annotation. This needs to be called before the text is changed.

Parameters:
modelto search for annotations to split.
offsetat which annotations should be splitted.

Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations