private ExplainPlanViewer getPlanView(SQLQuery sqlQuery, DBCQueryPlanner planner) {

        // 1. Determine whether planner supports plan extraction

        if (planner == null) {
            DBWorkbench.getPlatformUI().showError("Execution plan", "Execution plan explain isn't supported by current datasource");
            return null;
        }
        // Transform query parameters
        if (sqlQuery != null) {
            if (!transformQueryWithParameters(sqlQuery)) {
                return null;
            }
        }

        ExplainPlanViewer planView = null;

        if (sqlQuery != null) {
            for (CTabItem item : resultTabs.getItems()) {
                if (item.getData() instanceof ExplainPlanViewer pv) {
                    if (pv.getQuery() != null && pv.getQuery().equals(sqlQuery)) {
                        setResultTabSelection(item);
                        planView = pv;
                        break;
                    }
                }
            }
        }

        if (planView == null) {
            int maxPlanNumber = 0;
            for (CTabItem item : resultTabs.getItems()) {
                if (item.getData() instanceof ExplainPlanViewer) {
                    maxPlanNumber = Math.max(maxPlanNumber, ((ExplainPlanViewer) item.getData()).getPlanNumber());
                }
            }
            maxPlanNumber++;

            planView = new ExplainPlanViewer(this, this, resultTabs, maxPlanNumber);
            final CTabItem item = new CTabItem(resultTabs, SWT.CLOSE);
            item.setControl(planView.getControl());
            item.setText(SQLEditorMessages.editors_sql_error_execution_plan_title + " - " + maxPlanNumber);
            if (sqlQuery != null) {
                // Prepare query for tooltip
                String preparedText = sqlQuery.getText().replaceAll("[\n\r\t]{3,}", "");
                if (preparedText.length() > 300) {
                    item.setToolTipText(preparedText.substring(0, 300) + "...");
                } else {
                    item.setToolTipText(preparedText);
                }
            }
            item.setImage(IMG_EXPLAIN_PLAN);
            item.setData(planView);
            item.addDisposeListener(resultTabDisposeListener);
            UIUtils.disposeControlOnItemDispose(item);
            setResultTabSelection(item);
        }
        return planView;
    }
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