Package org.eclipse.jface.text
Interface IDocumentInformationMappingExtension2
-
- All Known Implementing Classes:
ProjectionMapping
public interface IDocumentInformationMappingExtension2
Extension toIDocumentInformationMapping
.Extends the information available in the mapping by providing access to the closest image region of an origin region.
- Since:
- 3.1
- See Also:
IDocumentInformationMapping
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IRegion
toClosestImageRegion(IRegion originRegion)
Returns the minimal region of the image document that completely comprises the given region of the original document.
-
-
-
Method Detail
-
toClosestImageRegion
IRegion toClosestImageRegion(IRegion originRegion) throws BadLocationException
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
-
-