Ejemplo n.º 1
0
  @Execute
  public void execute() {
    modelProviderService.saveFile();

    if (getCommandStack() != null) {
      ((BasicCommandStack) getCommandStack()).saveIsDone();
    }
  }
Ejemplo n.º 2
0
  @CanExecute
  public boolean canExecute() {
    File file = modelProviderService.getFile();

    return (file != null
        && file.getFilename() != null
        && getCommandStack() != null
        && ((BasicCommandStack) getCommandStack()).isSaveNeeded());
  }