X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=eclipse%2Fplugins%2Fruntime%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fcommands%2FClearBatchHandler.java;fp=eclipse%2Fplugins%2Fruntime%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fcommands%2FClearBatchHandler.java;h=eb6809c1f2a53ef05130e441408c9f53cdd5d6f9;hb=5e5b06fe0c831e66bc048d8bf8da40b32f79a5c9;hp=0000000000000000000000000000000000000000;hpb=09787bd2df473bd311af94f1af22c7f802257751;p=gpl%2Fargeo-slc.git diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/ClearBatchHandler.java b/eclipse/plugins/runtime/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/ClearBatchHandler.java new file mode 100644 index 000000000..eb6809c1f --- /dev/null +++ b/eclipse/plugins/runtime/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/ClearBatchHandler.java @@ -0,0 +1,30 @@ +package org.argeo.slc.client.ui.commands; + +import org.argeo.slc.client.ui.views.ProcessBuilderView; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * + * @author bsinou + * + * Remove all processes from the batch built in the ProcessBuilderView + * + * NOTE : only one batch is supported with this command, if more than + * one batch is planned, this class must be updated with parameter. + */ +public class ClearBatchHandler extends AbstractHandler { + // private final static Log log = + // LogFactory.getLog(ClearBatchHandler.class); + + public Object execute(ExecutionEvent event) throws ExecutionException { + ProcessBuilderView pbView = (ProcessBuilderView) HandlerUtil + .getActiveWorkbenchWindow(event).getActivePage() + .findView(ProcessBuilderView.ID); + pbView.clearBatch(); + return null; + } + +}