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