Interface IDocumentInformationMappingExtension2

    • 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 to IDocumentInformationMapping.toImageRegion(IRegion) is that this method will always return an image region for a valid origin region. If originRegion 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 - if originRegion is not a valid region of the original document