@Override
    protected SourceViewer createPatternViewer(Composite parent) {
        IDocument document = new Document();
        SQLEditorSourceViewer viewer = new SQLEditorSourceViewer(
                parent, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL,
                DBWorkbench.getPlatform()::getPreferenceStore
        );
        //FIXME: reconciling is turned off here because it's a cause of deadlocks and severe UI glitches. The exact cause is unknown, find a more precise solution. [dbeaver/dbeaver#11452]
        SQLEditorSourceViewerConfiguration configuration = new SQLEditorSourceViewerConfiguration(sqlEditor, EditorsPlugin.getDefault().getPreferenceStore(), null);
        viewer.configure(configuration);
        viewer.setEditable(false);
        viewer.setDocument(document);

        Control control = viewer.getControl();
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
        control.setLayoutData(data);

        viewer.setEditable(false);
        return viewer;
    }
Create a new AbstractTemplatesPage for the JavaEditor

@param sqlEditor the java editor
plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/templates/SQLTemplatesPage.java