]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/commands/LaunchBatchHandler.java
e770c34b052e40a557f7adfc0f354e8e4b257cd0
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.ui / src / main / java / org / argeo / slc / client / ui / commands / LaunchBatchHandler.java
1 package org.argeo.slc.client.ui.commands;
2
3 import org.argeo.slc.client.ui.views.ProcessBuilderView;
4 import org.eclipse.core.commands.AbstractHandler;
5 import org.eclipse.core.commands.ExecutionEvent;
6 import org.eclipse.core.commands.ExecutionException;
7 import org.eclipse.ui.handlers.HandlerUtil;
8
9 /**
10 *
11 * @author bsinou
12 *
13 * Launch the batch built in the ProcessBuilderView
14 *
15 * NOTE : only one batch is supported with this command, if more than
16 * one batch is planned, this class must be updated with parameter.
17 */
18 public class LaunchBatchHandler extends AbstractHandler {
19 // private final static Log log =
20 // LogFactory.getLog(LaunchBatchHandler.class);
21
22 public Object execute(ExecutionEvent event) throws ExecutionException {
23 ProcessBuilderView pbView = (ProcessBuilderView) HandlerUtil
24 .getActiveWorkbenchWindow(event).getActivePage()
25 .findView(ProcessBuilderView.ID);
26 pbView.launchBatch();
27 return null;
28 }
29
30 }