@Override
    public boolean isLeafObject(Object object) {
        if (object instanceof DBNDatabaseNode) {
            return dbFilter.isLeafObject(object);
        }
        return super.isLeafObject(object);
    }
Filter which works differently depending on node type
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/SmartNavigatorTreeFilter.java