private int skipToPreviousListItemOrListStart() {
        int startLine = line;
        int startPosition = position;
        while (true) {
            nextToken();

            // if any line item comes with its own indentation, adapt to it
            if (line < startLine) {
                try {
                    int lineOffset = document.getLineOffset(startLine);
                    int bound = Math.min(document.getLength(), startPosition + 1);
                    int align = scanner.findNonWhitespaceForwardInAnyPartition(lineOffset, bound);
                } catch (BadLocationException e) {
//                    _log.debug(EditorMessages.error_badLocationException, e);
                    // ignore and return just the position
                }
                return startPosition;
            }

            switch (token) {
                case SQLIndentSymbols.TokenEOF:
                    return 0;

            }
        }
    }
Returns the reference position for a list element. The algorithm tries to match any previous indentation on the
same list. If there is none, the reference position returned is determined depending on the type of list: The
indentation will either match the list scope introducer (e.g. for method declarations), so called deep indents,
or simply increase the indentation by a number of standard indents.

@return the reference position for a list item: either a previous list item that has its own indentation, or the
list introduction start.
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/indent/SQLIndenter.java