-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;\r
+\r
+import org.eclipse.e4.core.di.annotations.CanExecute;\r
+import org.eclipse.e4.core.di.annotations.Execute;\r
+import org.eclipse.e4.ui.workbench.modeling.EPartService;\r
+\r
+public class SaveHandler\r
+{\r
+\r
+ @CanExecute\r
+ public boolean canExecute(EPartService partService)\r
+ {\r
+ if (partService != null)\r
+ {\r
+ return !partService.getDirtyParts().isEmpty();\r
+ }\r
+ return false;\r
+ }\r
+\r
+ @Execute\r
+ public void execute(EPartService partService)\r
+ {\r
+ partService.saveAll(false);\r
+ }\r
}
\ No newline at end of file