]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms.e4/src/org/argeo/cms/e4/handlers/SaveAllParts.java
Introduce E4 privileged job
[lgpl/argeo-commons.git] / org.argeo.cms.e4 / src / org / argeo / cms / e4 / handlers / SaveAllParts.java
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 }