package org.fipro.eclipse.migration.e4.ui.handler;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
public class SaveHandler {
@Execute
public void execute(EPartService partService) {
partService.saveAll(false);
}
@CanExecute
public boolean canExecute(EPartService partService) {
if (partService != null) {
return !partService.getDirtyParts().isEmpty();
}
return false;
}
}