private void explainQueryPlan(SQLQuery sqlQuery) {
        showResultsPanel(false);
        DBCQueryPlanner planner = GeneralUtils.adapt(getDataSource(), DBCQueryPlanner.class);

        DBCPlanStyle planStyle = planner.getPlanStyle();
        if (planStyle == DBCPlanStyle.QUERY) {
            explainPlanFromQuery(planner, sqlQuery);
        } else if (planStyle == DBCPlanStyle.OUTPUT) {
            explainPlanFromQuery(planner, sqlQuery);
            showOutputPanel(true);
        } else {
            ExplainPlanViewer planView = getPlanView(sqlQuery, planner);

            if (planView != null) {
                planView.explainQueryPlan(sqlQuery, planner);
            }
        }
    }
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