2 package eu
.etaxonomy
.taxeditor
.workbench
;
4 import javax
.inject
.Named
;
6 import org
.eclipse
.e4
.core
.di
.annotations
.CanExecute
;
7 import org
.eclipse
.e4
.core
.di
.annotations
.Execute
;
8 import org
.eclipse
.e4
.ui
.model
.application
.ui
.basic
.MPart
;
9 import org
.eclipse
.e4
.ui
.services
.IServiceConstants
;
10 import org
.eclipse
.e4
.ui
.workbench
.modeling
.EPartService
;
12 public class SaveHandler
{
15 public void execute(@Named(IServiceConstants
.ACTIVE_PART
)MPart activePart
, EPartService partService
) {
16 partService
.savePart(activePart
, false);
21 public boolean canExecute(@Named(IServiceConstants
.ACTIVE_PART
)MPart activePart
) {
22 return activePart
.isDirty();