long totalNumberOfLines()
    {
        long result = 1L;
        if (content != null) {
            if (bytesPerLine > 0) {
                result = (content.length() - 1L) / bytesPerLine + 1L;
            }
        }

        return result;
    }
Stop findAndSelect() or replaceAll() calls. Long running searches can be stopped from another
thread.
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexEditControl.java