@Override public void execute() { savePopUpPresenter.show(path, new ParameterizedCommand<String>() { @Override public void execute(final String comment) { busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Restoring()); versionService.call( getRestorationSuccessCallback(), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)) .restore(path, comment); } }); } };
private Command cancelCommand() { return () -> presenter.cancel(); }
public void show(final Path path, final ParameterizedCommand<String> command) { final ParameterizedCommand<String> wrappedCommand = wrapWithSaveInProgressEvent(path, command); if (isVersioned(path)) { show(wrappedCommand); } else { wrappedCommand.execute(""); } }
@Test public void testShowWithoutPath() throws Exception { presenter.show(command); verify(view).show(); assertEquals(command, presenter.getCommand()); }
private Command saveCommand() { return () -> presenter.save(); }
@Before public void init() throws Exception { presenter = new SavePopUpPresenter(view, saveInProgressEvent, toggleCommentPresenter); }
@Test public void testShowWithoutPath() throws Exception { presenter.show(command); verify(view).show(); assertEquals(command, presenter.getCommand()); }
public void show(final Path path, final ParameterizedCommand<String> command) { final ParameterizedCommand<String> wrappedCommand = wrapWithSaveInProgressEvent(path, command); if (isVersioned(path)) { show(wrappedCommand); } else { wrappedCommand.execute(""); } }
private Command saveCommand() { return () -> presenter.save(); }
@Before public void init() throws Exception { presenter = new SavePopUpPresenter(view, saveInProgressEvent, toggleCommentPresenter); }
@Override public void execute() { savePopUpPresenter.show(path, new ParameterizedCommand<String>() { @Override public void execute(final String comment) { busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Restoring()); versionService.call( getRestorationSuccessCallback(), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)) .restore(path, comment); } }); } };
private Command cancelCommand() { return () -> presenter.cancel(); }
public void save() { savePopUpPresenter.show(versionRecordManager.getCurrentPath(), new ParameterizedCommand<String>() { @Override public void execute(final String commitMessage) { runSaveCommand(commitMessage); } } ); concurrentUpdateSessionInfo = null; }
@Test public void cancel() throws Exception { presenter.cancel(); verify(view).hide(); } }
protected void save() { savePopUpPresenter.show(versionRecordManager.getCurrentPath(), new ParameterizedCommand<String>() { @Override public void execute(final String commitMessage) { getPluginServices().call(getSaveSuccessCallback(getContent().hashCode())).saveMenu( getContent(), commitMessage); } } ); concurrentUpdateSessionInfo = null; }
@Test public void cancel() throws Exception { presenter.cancel(); verify(view).hide(); } }