Package org.eclipse.jface.text

## Interface IDocumentInformationMappingExtension

All Known Implementing Classes:
  `ProjectionMapping`

    public interface IDocumentInformationMappingExtension

Extension to `IDocumentInformationMapping`.

Extends the information available in the mapping by providing explicit access to the isomorphic portion of the basically homomorphic information mapping.

Since:
  3.0
See Also:
  `IDocumentInformationMapping`

### Method Summary

All Methods Instance Methods Abstract Methods
`IRegion[]` `getExactCoverage​(IRegion originRegion)` Returns the maximal sub-regions of the given origin region which are completely covered.
`int` `getImageLength()` Returns the length of the image document.
`IRegion` `toExactImageRegion​(IRegion originRegion)` Adheres to `originRegion=toOriginRegion(toExactImageRegion(originRegion))`, if `toExactImageRegion(originRegion) !`
`IRegion[]` `toExactImageRegions​(IRegion originRegion)` Returns the segments of the image document that exactly correspond to the given region of the original document.
`IRegion[]` `toExactOriginRegions​(IRegion imageRegion)` Returns the fragments of the original document that exactly correspond to the given region of the image document.

### Method Detail

#### toExactImageRegion

    IRegion toExactImageRegion​(IRegion originRegion)
                        throws BadLocationException

Adheres to `originRegion=toOriginRegion(toExactImageRegion(originRegion))`, if `toExactImageRegion(originRegion) != null`. Returns `null` if there is no image for the given origin region.

Parameters:
  `originRegion` - the origin region
Returns:
  the exact image region or `null`
Throws:
  `BadLocationException` - if origin region is not a valid region in the origin document

#### toExactImageRegions

    IRegion[] toExactImageRegions​(IRegion originRegion)
                           throws BadLocationException

Returns the segments of the image document that exactly correspond to the given region of the original document. Returns `null` if there are no such image regions.

Parameters:
  `originRegion` - the region in the origin document
Returns:
  the segments in the image document or `null`
Throws:
  `BadLocationException` - in case the given origin region is not valid in the original document

#### toExactOriginRegions

    IRegion[] toExactOriginRegions​(IRegion imageRegion)
                            throws BadLocationException

Returns the fragments of the original document that exactly correspond to the given region of the image document.

Parameters:
  `imageRegion` - the region in the image document
Returns:
  the fragments in the origin document
Throws:
  `BadLocationException` - in case the given image region is not valid in the image document

#### getImageLength

    int getImageLength()

Returns the length of the image document.

Returns:
  the length of the image document

#### getExactCoverage

    IRegion[] getExactCoverage​(IRegion originRegion)
                        throws BadLocationException

Returns the maximal sub-regions of the given origin region which are completely covered. I.e. each offset in a sub-region has a corresponding image offset. Returns `null` if there are no such sub-regions.

Parameters:
  `originRegion` - the region in the origin document
Returns:
  the sub-regions with complete coverage or `null`
Throws:
  `BadLocationException` - in case the given origin region is not valid in the original document