]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms.e4/src/org/argeo/cms/e4/handlers/SavePart.java
Package SNAPSHOT sources.
[lgpl/argeo-commons.git] / org.argeo.cms.e4 / src / org / argeo / cms / e4 / handlers / SavePart.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.model.application.ui.basic.MPart;
6 import org.eclipse.e4.ui.workbench.modeling.EPartService;
7
8 public class SavePart {
9 @Execute
10 void execute(EPartService partService, MPart part) {
11 partService.savePart(part, false);
12 }
13
14 @CanExecute
15 boolean canExecute(MPart part) {
16 return part.isDirty();
17 }
18 }