X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=SampleERCP%2Fsrc%2Fsampleercp%2Fhandlers%2FSaveHandler.java;h=35f3e79cabf12cf0f2a2bc5289433cb23ab2a343;hb=10e87495184e49c5cab906921f0afaf2473d9aed;hp=de086e035af23871df10bf67c3a501653ddb1425;hpb=bd48b3549a226e35a07073dd5beee4c21de1aba5;p=Mograsim.git diff --git a/SampleERCP/src/sampleercp/handlers/SaveHandler.java b/SampleERCP/src/sampleercp/handlers/SaveHandler.java index de086e03..35f3e79c 100644 --- a/SampleERCP/src/sampleercp/handlers/SaveHandler.java +++ b/SampleERCP/src/sampleercp/handlers/SaveHandler.java @@ -1,21 +1,25 @@ -package sampleercp.handlers; - -import org.eclipse.e4.core.di.annotations.CanExecute; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.workbench.modeling.EPartService; - -public class SaveHandler { - - @CanExecute - public boolean canExecute(EPartService partService) { - if (partService != null) { - return !partService.getDirtyParts().isEmpty(); - } - return false; - } - - @Execute - public void execute(EPartService partService) { - partService.saveAll(false); - } +package sampleercp.handlers; + +import org.eclipse.e4.core.di.annotations.CanExecute; +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.e4.ui.workbench.modeling.EPartService; + +public class SaveHandler +{ + + @CanExecute + public boolean canExecute(EPartService partService) + { + if (partService != null) + { + return !partService.getDirtyParts().isEmpty(); + } + return false; + } + + @Execute + public void execute(EPartService partService) + { + partService.saveAll(false); + } } \ No newline at end of file