public void exportDataFromQuery(@Nullable SQLScriptContext sqlScriptContext)
    {
        List<SQLScriptElement> elements = getSelectedQueries();

        if (!elements.isEmpty()) {
            processQueries(elements, false, false, true, true, null, sqlScriptContext);
        } else {
            DBWorkbench.getPlatformUI().showError(
                    "Extract data",
                    "Choose one or more queries to export from");
        }
    }
Obtain the add-in instance by its concrete type
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditor.java