Class ProjectionMapping

java.lang.Object
org.eclipse.jface.text.projection.ProjectionMapping
All Implemented Interfaces:
IDocumentInformationMapping, IDocumentInformationMappingExtension, IDocumentInformationMappingExtension2

Internal class. Do not use. Only public for testing purposes.

Implementation of IDocumentInformationMapping for the projection mapping between a master and a slave document.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProjectionMapping(IDocument masterDocument, String fragmentsCategory, IDocument slaveDocument, String segmentsCategory)
    Creates a new mapping between the given parent document and the given projection document.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the minimal region of the original document that completely comprises all of the image document or null if there is no such region.
    getExactCoverage(IRegion originRegion)
    Returns the maximal sub-regions of the given origin region which are completely covered.
    int
    Returns the length of the image document.
    void
    Notifies this projection mapping that there was a projection change.
    int
    toClosestImageLine(int originLine)
    Returns the line of the image document whose corresponding line in the original document is closest to the given line in the original document.
    Returns the minimal region of the image document that completely comprises the given region of the original document.
    Adheres to originRegion=toOriginRegion(toExactImageRegion(originRegion)), if toExactImageRegion(originRegion) !
    Returns the segments of the image document that exactly correspond to the given region of the original document.
    Returns the fragments of the original document that exactly correspond to the given region of the image document.
    int
    toImageLine(int originLine)
    Returns the line of the image document that corresponds to the given line of the original document or -1 if there is no such line.
    int
    toImageOffset(int originOffset)
    Returns the offset in the image document that corresponds to the given offset in the original document or -1 if there is no such offset
    toImageRegion(IRegion originRegion)
    Returns the minimal region of the image document that completely comprises the given region of the original document or null if there is no such region.
    int
    toOriginLine(int imageLine)
    Returns the line of the original document that corresponds to the given line of the image document or -1 if there is no such line.
    toOriginLines(int imageLine)
    Returns the range of lines of the original document that corresponds to the given line of the image document or null if there are no such lines.
    int
    toOriginOffset(int imageOffset)
    Returns the offset in the original document that corresponds to the given offset in the image document or -1 if there is no such offset
    toOriginRegion(IRegion imageRegion)
    Returns the minimal region of the original document that completely comprises the given region of the image document or null if there is no such region.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProjectionMapping

      public ProjectionMapping(IDocument masterDocument, String fragmentsCategory, IDocument slaveDocument, String segmentsCategory)
      Creates a new mapping between the given parent document and the given projection document.
      Parameters:
      masterDocument - the master document
      fragmentsCategory - the position category of the parent document used to manage the projected regions
      slaveDocument - the slave document
      segmentsCategory - the position category of the projection document used to manage the fragments
  • Method Details