class DataSetDefWizardScreen {

    void onTabChangedEvent(@Observes TabChangedEvent tabChangedEvent) {
        checkNotNull("tabChangedEvent",
                     tabChangedEvent);
        try {
            // This event should only be fired when worklow is an instance of the DataSetEditWorkflow, as it uses the main tabbed editor. 
            if (tabChangedEvent.getContext().equals(((DataSetEditWorkflow) currentWorkflow).getEditor())) {
                currentWorkflow.clearButtons();
                String tabId = tabChangedEvent.getTabId();
                if (tabId != null && DataSetEditor.TAB_CONFIGURATION.equals(tabId)) {
                    currentWorkflow.showTestButton();
                } else {
                    currentWorkflow.showBackButton().showNextButton();
                }
            }
        } catch (final ClassCastException e) {
            // Skip event.
        }
    }

    @Inject public  DataSetDefWizardScreen(final SyncBeanManager beanManager,
                                  final DataSetEditorWorkflowFactory workflowFactory,
                                  final Caller<DataSetDefVfsServices> services,
                                  final DataSetClientServices clientServices,
                                  final Event<NotificationEvent> notification,
                                  final PlaceManager placeManager,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final SavePopUpPresenter savePopUpPresenter,
                                  final DataSetDefScreenView view);

}