protected CommandDrivenErrorCallback getCouldNotGenerateSourceErrorCallback() { return new CommandDrivenErrorCallback(baseView, new CommandBuilder() .addSourceCodeGenerationFailedException(baseView, sourceWidget) .build() ); }
@Override public boolean error(final Message message, final Throwable throwable) { hideLoadingIndicator(); return wrapped.error(message, throwable); } };
public AssetValidatedCallback getValidationCallback(final Command validationFinishedCommand){ return new AssetValidatedCallback(validationFinishedCommand, notificationEvent, this); }
protected CommandDrivenErrorCallback getNoSuchFileExceptionErrorCallback() { return new CommandDrivenErrorCallback(baseView, new CommandBuilder() .addNoSuchFileException(baseView, kieView.getMultiPage(), menus) .addFileSystemNotFoundException(baseView, kieView.getMultiPage(), menus) .build() ) { @Override public boolean error(final Message message, final Throwable throwable) { mayCloseHandler = EXCEPTION_MAY_CLOSE_HANDLER; return super.error(message, throwable); } }; }
ErrorCallback<?> createErrorCallback(Map<Class<? extends Throwable>, CommandWithThrowableDrivenErrorCallback.CommandWithThrowable> errors) { return new CommandWithThrowableDrivenErrorCallback(busyIndicatorView, errors); }
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; }
@Override public boolean error(final Message message, final Throwable throwable) { building = false; return super.error(message, throwable); } }
@Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } }
/** * Default callback for when loading a document fails. * @return */ protected CommandDrivenErrorCallback getNoSuchFileExceptionErrorCallback() { return new CommandDrivenErrorCallback(editorView, new CommandBuilder() .addNoSuchFileException(editorView, kieEditorWrapperView.getMultiPage(), menus) .addFileSystemNotFoundException(editorView, kieEditorWrapperView.getMultiPage(), menus) .build() ) { @Override public boolean error(final Message message, final Throwable throwable) { mayCloseHandler = EXCEPTION_MAY_CLOSE_HANDLER; return super.error(message, throwable); } }; }
/** * Default callback for when retrieval of a document's source fails. * @return */ protected CommandDrivenErrorCallback getCouldNotGenerateSourceErrorCallback() { return new CommandDrivenErrorCallback(editorView, new CommandBuilder() .addSourceCodeGenerationFailedException(editorView, sourceWidget) .build() ); }
@Override public boolean error(final Message message, final Throwable throwable) { mayCloseHandler = EXCEPTION_MAY_CLOSE_HANDLER; return super.error(message, throwable); } };
ErrorCallback<?> createErrorCallback(Map<Class<? extends Throwable>, CommandWithThrowableDrivenErrorCallback.CommandWithThrowable> errors) { return new CommandWithThrowableDrivenErrorCallback(busyIndicatorView, errors); }
public CommandBuilder addNoSuchFileException(final HasBusyIndicator view, final Menus menus) { add(NoSuchFileException.class, new Command() { @Override public void execute() { disableMenuItems(menus); view.hideBusyIndicator(); } } ); return this; }
@Override public boolean error(final Message message, final Throwable throwable) { hideLoadingIndicator(); return wrapped.error(message, throwable); } };
public CommandBuilder addFileSystemNotFoundException(final HasBusyIndicator view, final Menus menus) { add(FileSystemNotFoundException.class, new Command() { @Override public void execute() { disableMenuItems(menus); view.hideBusyIndicator(); } } ); return this; }
@Override public boolean error(final Message message, final Throwable throwable) { mayCloseHandler = EXCEPTION_MAY_CLOSE_HANDLER; return super.error(message, throwable); } };
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 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 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; }
public CommandBuilder addNoSuchFileException(final HasBusyIndicator view, final MultiPageEditor editor, final Menus menus) { add(NoSuchFileException.class, new Command() { @Override public void execute() { editor.clear(); editor.addWidget(new NoSuchFileWidget(), CommonConstants.INSTANCE.NoSuchFileTabTitle()); disableMenuItems(menus); view.hideBusyIndicator(); } } ); return this; }