Eclipse Platform
Release 3.0

org.eclipse.jface.text.source.projection
Class ProjectionSupport

java.lang.Object
  extended byorg.eclipse.jface.text.source.projection.ProjectionSupport

public class ProjectionSupport
extends Object

Supports the configuration of projection capabilities a ProjectionViewer.

This class is not intended to be subclassed. Clients are supposed to use it as is.

Since:
3.0

Field Summary
static Object PROJECTION
          Key of the projection annotation model inside the visual annotation model.
 
Constructor Summary
ProjectionSupport(ProjectionViewer viewer, IAnnotationAccess annotationAccess, ISharedTextColors sharedTextColors)
          Creates new projection support for the given projection viewer.
 
Method Summary
 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.
 Object getAdapter(ISourceViewer viewer, Class 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECTION

public static final Object PROJECTION
Key of the projection annotation model inside the visual annotation model. Also internally used as key for the projection drawing strategy.

Constructor Detail

ProjectionSupport

public ProjectionSupport(ProjectionViewer viewer,
                         IAnnotationAccess annotationAccess,
                         ISharedTextColors sharedTextColors)
Creates new projection support for the given projection viewer.

Parameters:
viewer - the projection viewer
annotationAccess - the annotation access
sharedTextColors - the shared text colors to use
Method Detail

addSummarizableAnnotationType

public void addSummarizableAnnotationType(String annotationType)
Marks the given annotation type to be considered when creating summaries for collapsed regions of the projection viewer.

Parameters:
annotationType - the annotation type to consider

removeSummarizableAnnotationType

public void removeSummarizableAnnotationType(String annotationType)
Marks the given annotation type to be ignored when creating summaries for collapsed regions of the projection viewer. This method has only an effect when addSummarizableAnnotationType has been called before for the give annotation type.

Parameters:
annotationType - the annotation type to remove

setHoverControlCreator

public 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.

Parameters:
creator - the hover control creator

install

public void install()
Installs this projection support on its viewer.


dispose

public void dispose()
Disposes this projection support.


doEnableProjection

protected void doEnableProjection()
Enables projection mode. If not yet done, installs the projection ruler column in the viewer's vertical ruler and installs a painter that indicate the locations of collapsed regions.


doDisableProjection

protected void doDisableProjection()
Removes the projection ruler column and the painter from the projection viewer.


getAdapter

public Object getAdapter(ISourceViewer viewer,
                         Class required)
Implements the contract of IAdaptable.getAdapter(java.lang.Class) by forwarding the adapter requests to the given viewer.

Parameters:
viewer - the viewer
required - the required class of the adapter
Returns:
the adapter or null

Eclipse Platform
Release 3.0

Guidelines for using Eclipse APIs.

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