IndentPosition(BaleRegion br, int off) throws BadLocationException { RegionData rd = region_map.get(br); validateRegions(); int roff = rd.getRegionOffset(br, off); int voff = rd.getViewOffset(roff); local_offset = off - voff; base_position = base_document.createPosition(br.getStart() + roff); }
protected int mapViewOffsetToRegion(BaleRegion br, int offset, boolean edit) { if (region_map != null) { fixupOffset(br, offset, edit); RegionData rd = region_map.get(br); return rd.getRegionOffset(br, offset); } return offset; }