private static boolean isTemplateContextFitsEditorContext(
        @NotNull String templateContextTypeId,
        @Nullable String driverContextTypeId,
        @Nullable String providerContextTypeId
    ) {
        return templateContextTypeId.equalsIgnoreCase(SQLContextTypeBase.ID_SQL) ||
            templateContextTypeId.equalsIgnoreCase(driverContextTypeId) ||
            templateContextTypeId.equalsIgnoreCase(providerContextTypeId);
    }
Checks whether template's context is suitable for the editor context
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/SQLEditorUtils.java