public void apply(IDocument document) {
		try {
			document.replace(replacementPosition.getOffset(), replacementPosition.getLength(), replacementString);
		} catch (BadLocationException x) {
			// ignore
		}
        // Reset variable settings
        if (variable instanceof SQLVariable) {
            SQLVariable sqlVariable = (SQLVariable) variable;
            if (!replacementString.equals(sqlVariable.getCurrentChoice())) {
                sqlVariable.setCurrentChoice(replacementString);
/*
                for (SQLVariable var : sqlVariable.getContext().getVariables()) {
                    if (var != sqlVariable) {
                        TemplateVariableResolver resolver = var.getResolver();
                        if (resolver != null) {
                            resolver.resolve(var, sqlVariable.getContext());
                        }
                    }
                }
*/
            }
        }
    }
The additional info of this proposal
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/templates/SQLVariableCompletionProposal.java