1 package org.argeo.cms.e4.handlers; 2 3 import org.eclipse.e4.core.di.annotations.CanExecute; 4 import org.eclipse.e4.core.di.annotations.Execute; 5 import org.eclipse.e4.ui.workbench.modeling.EPartService; 6 7 public class SaveAllParts { 8 9 @Execute 10 void execute(EPartService partService) { 11 partService.saveAll(false); 12 } 13 14 @CanExecute 15 boolean canExecute(EPartService partService) { 16 return partService.getDirtyParts().size() > 0; 17 } 18 19 }