@Execute public void execute() { modelProviderService.saveFile(); if (getCommandStack() != null) { ((BasicCommandStack) getCommandStack()).saveIsDone(); } }
@CanExecute public boolean canExecute() { File file = modelProviderService.getFile(); return (file != null && file.getFilename() != null && getCommandStack() != null && ((BasicCommandStack) getCommandStack()).isSaveNeeded()); }