private int obtainTokenId(@NotNull String str) {
        if (!RECOGNIZABLE_TOKEN_PATTERN.test(str)) {
            throw new IllegalArgumentException("Illegal block completion part '" + str + "' while expecting keyword-like token.");
        }
        
        Integer id = tokenIdByString.get(str);
        if (id == null) {
            id = tokenStringById.size() + KNOWN_TOKEN_ID_BASE;
            tokenStringById.add(str);
            tokenIdByString.put(str, id);
        }
        return id;
    }
Get token id for token string.
If token has't been registered yet, id will be generated.
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/indent/SQLBlockCompletionsCollection.java