private boolean isWhitespace(int offset, int exclusiveEnd) {
            if (exclusiveEnd != -1 && offset != -1) {
                for (CharSequence seq = this.sqlIterator.getTextValue(); offset < exclusiveEnd; ++offset) {
                    char ch = seq.charAt(offset);
                    if (!Character.isWhitespace(ch)) {
                        return false;
                    }

                    if (ch == '\n' || ch == '\r') {
                        return false;
                    }
                }

                return true;
            } else {
                return false;
            }
        }
Finds the next position after the given position.

@param position the current position
@return the next position
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorCustomActions.java