public class ProjectionSupport extends Object
ProjectionViewer
.
This class is not intended to be subclassed. Clients are supposed to configure and use it as is.
Modifier and Type | Field and Description |
---|---|
static Object |
PROJECTION
Key of the projection annotation model inside the visual annotation
model.
|
Constructor and Description |
---|
ProjectionSupport(ProjectionViewer viewer,
IAnnotationAccess annotationAccess,
ISharedTextColors sharedTextColors)
Creates new projection support for the given projection viewer.
|
Modifier and Type | Method and Description |
---|---|
void |
addSummarizableAnnotationType(String annotationType)
Marks the given annotation type to be considered when creating summaries for
collapsed regions of the projection viewer.
|
void |
dispose()
Disposes this projection support.
|
protected void |
doDisableProjection()
Removes the projection ruler column and the painter from the projection
viewer.
|
protected void |
doEnableProjection()
Enables projection mode.
|
<T> T |
getAdapter(ISourceViewer viewer,
Class<T> required)
Implements the contract of
IAdaptable.getAdapter(java.lang.Class)
by forwarding the adapter requests to the given viewer. |
void |
install()
Installs this projection support on its viewer.
|
void |
removeSummarizableAnnotationType(String annotationType)
Marks the given annotation type to be ignored when creating summaries for
collapsed regions of the projection viewer.
|
void |
setAnnotationPainterDrawingStrategy(AnnotationPainter.IDrawingStrategy strategy)
Sets the drawing strategy that the projection support's annotation
painter uses to draw the indication of collapsed regions onto the
projection viewer's text widget.
|
void |
setHoverControlCreator(IInformationControlCreator creator)
Sets the hover control creator that is used for the annotation hovers
that are shown in the projection viewer's projection ruler column.
|
void |
setInformationPresenterControlCreator(IInformationControlCreator creator)
Sets the information presenter control creator that is used for the annotation
hovers that are shown in the projection viewer's projection ruler column.
|
public static final Object PROJECTION
public ProjectionSupport(ProjectionViewer viewer, IAnnotationAccess annotationAccess, ISharedTextColors sharedTextColors)
viewer
- the projection viewerannotationAccess
- the annotation accesssharedTextColors
- the shared text colors to usepublic void addSummarizableAnnotationType(String annotationType)
A summary is an annotation that gets created out of all annotations with a type that has been registered through this method and that are inside the folded region.
annotationType
- the annotation type to considerpublic void removeSummarizableAnnotationType(String annotationType)
addSummarizableAnnotationType
has been called before for
the give annotation type.
A summary is an annotation that gets created out of all annotations with a type that has been registered through this method and that are inside the folded region.
annotationType
- the annotation type to removepublic void setHoverControlCreator(IInformationControlCreator creator)
creator
- the hover control creatorpublic void setInformationPresenterControlCreator(IInformationControlCreator creator)
creator
- the information presenter control creatorpublic void setAnnotationPainterDrawingStrategy(AnnotationPainter.IDrawingStrategy strategy)
null
is passed in,
the drawing strategy is reset to the default. In order to avoid any
representation use AnnotationPainter.NullStrategy
.strategy
- the drawing strategy or null
to reset the
strategy to the defaultpublic void install()
public void dispose()
protected void doEnableProjection()
protected void doDisableProjection()
public <T> T getAdapter(ISourceViewer viewer, Class<T> required)
IAdaptable.getAdapter(java.lang.Class)
by forwarding the adapter requests to the given viewer.viewer
- the viewerrequired
- the required class of the adapternull
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.