Exemplo n.º 1
0
  public CommandBuilder addNoSuchFileException(final HasBusyIndicator view, final Menus menus) {
    add(
        NoSuchFileException.class,
        new Command() {

          @Override
          public void execute() {
            disableMenuItems(menus);
            view.hideBusyIndicator();
          }
        });
    return this;
  }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
  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;
  }
Exemplo n.º 4
0
  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;
  }
Exemplo n.º 5
0
  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;
  }
Exemplo n.º 6
0
  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;
  }