Source:
public SearchableDetailModelProvider<Disk, StorageListModel, StorageDiskListModel> getStorageDiskListProvider(EventBus eventBus, Provider<DefaultConfirmationPopupPresenterWidget> defaultConfirmPopupProvider, final Provider<VmDiskRemovePopupPresenterWidget> removeConfirmPopupProvider, final Provider<UploadImagePopupPresenterWidget> uploadImagePopupProvider, final Provider<DisksAllocationPopupPresenterWidget> movePopupProvider, final Provider<DisksAllocationPopupPresenterWidget> copyPopupProvider, final Provider<StorageListModel> mainModelProvider, final Provider<StorageDiskListModel> modelProvider) { SearchableDetailTabModelProvider<Disk, StorageListModel, StorageDiskListModel> result = new SearchableDetailTabModelProvider<Disk, StorageListModel, StorageDiskListModel>( eventBus, defaultConfirmPopupProvider) { @Override public AbstractModelBoundPopupPresenterWidget<? extends Model, ?> getModelPopup(StorageDiskListModel source, UICommand lastExecutedCommand, Model windowModel) { if (lastExecutedCommand == getModel().getUploadCommand() || lastExecutedCommand == getModel().getResumeUploadCommand()) { return uploadImagePopupProvider.get(); } else if (lastExecutedCommand == getModel().getMoveCommand()) { return movePopupProvider.get(); } else if (lastExecutedCommand == getModel().getCopyCommand()) { return copyPopupProvider.get(); } else { return super.getModelPopup(source, lastExecutedCommand, windowModel); } } @Override public AbstractModelBoundPopupPresenterWidget<? extends ConfirmationModel, ?> getConfirmModelPopup(StorageDiskListModel source, UICommand lastExecutedCommand) { if (lastExecutedCommand == getModel().getRemoveCommand()) { return removeConfirmPopupProvider.get(); } else { return super.getConfirmModelPopup(source, lastExecutedCommand); } } }; result.setMainModelProvider(mainModelProvider); result.setModelProvider(modelProvider); return result; }

Target:
public SearchableDetailModelProvider<Disk, StorageListModel, StorageDiskListModel> getStorageDiskListProvider(EventBus eventBus, Provider<DefaultConfirmationPopupPresenterWidget> defaultConfirmPopupProvider, final Provider<VmDiskRemovePopupPresenterWidget> removeConfirmPopupProvider, final Provider<UploadImagePopupPresenterWidget> uploadImagePopupProvider, final Provider<DisksAllocationPopupPresenterWidget> movePopupProvider, final Provider<DisksAllocationPopupPresenterWidget> copyPopupProvider, final Provider<StorageListModel> mainModelProvider, final Provider<StorageDiskListModel> modelProvider) { SearchableDetailTabModelProvider<Disk, StorageListModel, StorageDiskListModel> result = new SearchableDetailTabModelProvider<Disk, StorageListModel, StorageDiskListModel>( eventBus, defaultConfirmPopupProvider) { @Override public AbstractModelBoundPopupPresenterWidget<? extends Model, ?> getModelPopup(StorageDiskListModel source, UICommand lastExecutedCommand, Model windowModel) { if (lastExecutedCommand == getModel().getUploadCommand() || lastExecutedCommand == getModel().getResumeUploadCommand()) { return uploadImagePopupProvider.get(); } else if (lastExecutedCommand == getModel().getMoveCommand()) { return movePopupProvider.get(); } else if (lastExecutedCommand == getModel().getCopyCommand()) { return copyPopupProvider.get(); } return super.getModelPopup(source, lastExecutedCommand, windowModel); } @Override public AbstractModelBoundPopupPresenterWidget<? extends ConfirmationModel, ?> getConfirmModelPopup(StorageDiskListModel source, UICommand lastExecutedCommand) { if (lastExecutedCommand == getModel().getRemoveCommand()) { return removeConfirmPopupProvider.get(); } else { return super.getConfirmModelPopup(source, lastExecutedCommand); } } }; result.setMainModelProvider(mainModelProvider); result.setModelProvider(modelProvider); return result; }