private void onSelectionChange(IStructuredSelection structSel) {
        if (!structSel.isEmpty()) {
            lastSelection = structSel.getFirstElement();
            if (lastSelection instanceof DBNRoot) {
                // Don't display status message for root node - it has no meaningful information
                getViewSite().getActionBars().getStatusLineManager().setMessage(null);
            } else if (lastSelection instanceof DBNNode node) {
                String name = node.getNodeDisplayName();
                String desc = node.getNodeDescription();
                if (node instanceof DBNDatabaseNode && !(node instanceof DBNDatabaseFolder)) {
                    name = node.getNodeTypeLabel() + ": " + name;
                }
                if (CommonUtils.isEmpty(desc)) {
                    getViewSite().getActionBars().getStatusLineManager().setMessage(name);
                } else {
                    getViewSite().getActionBars().getStatusLineManager().setMessage(name + " - " + desc);
                }
            }
        } else {
            lastSelection = null;
        }

        if (lastSelection instanceof DBNDatabaseNode && DBWorkbench.getPlatform().getPreferenceStore().getBoolean(NavigatorPreferences.NAVIGATOR_SYNC_EDITOR_DATASOURCE)) {
            IEditorPart activeEditor = UIUtils.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
            if (activeEditor != null) {
                NavigatorUtils.syncEditorWithNavigator(this, activeEditor);
            }
        }
    }
This is a callback that will allow us to create the viewer and initialize
it.
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/database/NavigatorViewBase.java