@Override
    public void onShow(final ShowPopupEvent e) {
        queryHelpPresenter.setTaskMonitorFactory(this);
        queryHelpPresenter.setIncludedTypes(EnumSet.of(
                QueryHelpType.FIELD,
                QueryHelpType.FUNCTION));
        queryHelpPresenter.setTextType(TextType.EXPRESSION);
        queryHelpPresenter.refresh();
        editorPresenter.focus();

        // If this is done without the scheduler then we get weird behaviour when you click
        // in the text area if line wrap is set to on.  If it is initially set to off and the user
        // manually sets it to on all is fine. Confused.
        Scheduler.get().scheduleDeferred(() -> {
            setupEditor();
            // Needs to be called after the editor is setup
            queryHelpPresenter.linkToEditor(this.editorPresenter);
        });
    }
This is the presenter for editing the function expression in a dashboard column
stroom-core-client/src/main/java/stroom/dashboard/client/table/ColumnFunctionEditorPresenter.java