1 package sampleercp.handlers;
\r
3 import org.eclipse.e4.core.di.annotations.CanExecute;
\r
4 import org.eclipse.e4.core.di.annotations.Execute;
\r
5 import org.eclipse.e4.ui.workbench.modeling.EPartService;
\r
7 public class SaveHandler
\r
11 public boolean canExecute(EPartService partService)
\r
13 if (partService != null)
\r
15 return !partService.getDirtyParts().isEmpty();
\r
21 public void execute(EPartService partService)
\r
23 partService.saveAll(false);
\r