public int next(int n) {
            int next = 0;

            while (true) {
                n--;
                if (n <= 0 || next == -1) {
                    return next;
                }

                next = this.next();
            }
        }
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