class DataSetFilterEditor implements IsWidget {

    public void init(DataSetFilter filter, DataSetMetadata metadata) {
        this.filter = filter;
        this.metadata = metadata;
        view.showNewFilterHome();
        view.clearColumnSelector();
        if (metadata != null) {
            for (int i = 0; i < metadata.getNumberOfColumns(); i++) {
                view.addColumn(metadata.getColumnId(i));
            }
        }

        view.clearColumnFilterEditors();
        if (filter != null) {
            for (ColumnFilter columnFilter : filter.getColumnFilterList()) {
                ColumnFilterEditor columnFilterEditor = beanManager.lookupBean(ColumnFilterEditor.class).newInstance();
                columnFilterEditor.init(metadata, columnFilter);
                view.addColumnFilterEditor(columnFilterEditor);
            }
        }
    }

    @Inject public  DataSetFilterEditor(View view,
                               SyncBeanManager beanManager,
                               Event<DataSetFilterChangedEvent> changeEvent);

}