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

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

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