public CommandBuilder addNoSuchFileException(final HasBusyIndicator view, final Menus menus) { add( NoSuchFileException.class, new Command() { @Override public void execute() { disableMenuItems(menus); view.hideBusyIndicator(); } }); return this; }
private Map<Class<? extends Throwable>, Command> makeNoSuchFileExceptionCommand() { final CommandBuilder builder = new CommandBuilder(); builder.add( NoSuchFileException.class, new Command() { @Override public void execute() { view.handleNoSuchFileException(); view.hideBusyIndicator(); } }); return builder.build(); }
public CommandBuilder addNoSuchFileException( final HasBusyIndicator view, final Callback<IsWidget> callback) { add( NoSuchFileException.class, new Command() { @Override public void execute() { callback.callback(new NoSuchFileWidget()); view.hideBusyIndicator(); } }); return this; }
public CommandBuilder addNoSuchFileException( final HasBusyIndicator view, final MultiPageEditor editor) { add( NoSuchFileException.class, new Command() { @Override public void execute() { editor.clear(); editor.addWidget(new NoSuchFileWidget(), CommonConstants.INSTANCE.NoSuchFileTabTitle()); view.hideBusyIndicator(); } }); return this; }
public CommandBuilder addSourceCodeGenerationFailedException( final HasBusyIndicator view, final ViewDRLSourceWidget sourceWidget) { add( SourceGenerationFailedException.class, new Command() { @Override public void execute() { sourceWidget.clearContent(); view.hideBusyIndicator(); ErrorPopup.showMessage(CommonConstants.INSTANCE.FailedToGenerateSource()); } }); return this; }
public CommandBuilder addFileSystemNotFoundException( final HasBusyIndicator view, final MultiPageEditor editor, final Menus menus) { add( FileSystemNotFoundException.class, new Command() { @Override public void execute() { editor.clear(); editor.addWidget(new NoSuchFileWidget(), CommonConstants.INSTANCE.NoSuchFileTabTitle()); disableMenuItems(menus); view.hideBusyIndicator(); } }); return this; }