Пример #1
0
  @Execute
  public void execute() {
    modelProviderService.saveFile();

    if (getCommandStack() != null) {
      ((BasicCommandStack) getCommandStack()).saveIsDone();
    }
  }
Пример #2
0
  @CanExecute
  public boolean canExecute() {
    File file = modelProviderService.getFile();

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