Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

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


java.lang.Object
  extended by 
org.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 configure and use it as is.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.

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 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.
 
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. Initially, no annotation types are summarized. A default hover control creator and a default drawing strategy are used.

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.

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.

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.

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.

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

setInformationPresenterControlCreator

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

Parameters:
creator - the information presenter control creator
Since:
3.3

setAnnotationPainterDrawingStrategy

public 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. When null is passed in, the drawing strategy is reset to the default. In order to avoid any representation use AnnotationPainter.NullStrategy.

Parameters:
strategy - the drawing strategy or null to reset the strategy to the default
Since:
3.1

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

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire