Package org.eclipse.jface.text
Interface IDocumentInformationMappingExtension2
- All Known Implementing Classes:
ProjectionMapping
public interface IDocumentInformationMappingExtension2
Extension to
IDocumentInformationMapping
.
Extends the information available in the mapping by providing access to the closest image region of an origin region.
- Since:
- 3.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiontoClosestImageRegion
(IRegion originRegion) Returns the minimal region of the image document that completely comprises the given region of the original document.
-
Method Details
-
toClosestImageRegion
Returns the minimal region of the image document that completely comprises the given region of the original document. The difference toIDocumentInformationMapping.toImageRegion(IRegion)
is that this method will always return an image region for a valid origin region. IforiginRegion
has no corresponding image region, the zero-length region at the offset between its surrounding fragments is returned.- Parameters:
originRegion
- the region of the original document- Returns:
- the minimal region of the image document comprising the given region of the original document
- Throws:
BadLocationException
- iforiginRegion
is not a valid region of the original document
-