public boolean isDefaultPartition(int position) {
        assert (position >= 0);
        assert (position <= document.getLength());

        try {
            ITypedRegion region = TextUtilities.getPartition(document, partitioning, position, false);
            return region.getType().equals(partition);

        } catch (BadLocationException e) {
//            _log.debug(EditorMessages.error_badLocationException, e);
        }

        return false;
    }
Checks whether <code>position</code> resides in a default (SQL) partition of <code>document</code>.

@param position the position to be checked
@return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>,
<code>false</code> otherwise
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/indent/SQLHeuristicScanner.java