if (selection instanceof IBlockTextSelection) { IBlockTextSelection bts= (IBlockTextSelection) selection; int startVirtual= Math.max(0, bts.getStartColumn() - document.getLineInformationOfOffset(bts.getOffset()).getLength()); int endVirtual= Math.max(0, bts.getEndColumn() - document.getLineInformationOfOffset(bts.getOffset() + bts.getLength()).getLength()); fSelection= new ColumnPosition(bts.getOffset(), bts.getLength(), startVirtual, endVirtual); } else { Point range= fTextWidget.getSelectionRange();
if (selection instanceof IBlockTextSelection) { IBlockTextSelection bts= (IBlockTextSelection) selection; int startVirtual= Math.max(0, bts.getStartColumn() - document.getLineInformationOfOffset(bts.getOffset()).getLength()); int endVirtual= Math.max(0, bts.getEndColumn() - document.getLineInformationOfOffset(bts.getOffset() + bts.getLength()).getLength()); fSelection= new ColumnPosition(bts.getOffset(), bts.getLength(), startVirtual, endVirtual); } else { Point range= fTextWidget.getSelectionRange();