private void schedule(@Nullable DocumentEvent event) {
        synchronized (this.syncRoot) {
            if (this.editor.getRuleManager() == null || !this.editor.isAdvancedHighlightingEnabled() ||
                !SQLEditorUtils.isSQLSyntaxParserApplied(this.editor.getEditorInput())
            ) {
                return;
            }

            if (this.job.getState() != Job.RUNNING) {
                this.job.cancel();
            }
            long delay;
            if (event != null && SQLConstants.DOT.equals(event.getText())) {
                delay = this.isRunning ? schedulingTimeoutMilliseconds / 2 : 0;
            } else {
                delay = schedulingTimeoutMilliseconds * (this.isRunning ? 2 : 1);
            }
            this.job.schedule(delay);
        }
    }
Prepare completion context for the specified position in the text
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/semantics/SQLBackgroundParsingJob.java