]> 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
JCR UI can run processes
[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 * Launch the batch built in the ProcessBuilderView
11 *
12 * NOTE : only one batch is supported with this command, if more than one batch
13 * is planned, this class must be updated with parameter.
14 */
15 public class LaunchBatchHandler extends AbstractHandler {
16 // private final static Log log =
17 // LogFactory.getLog(LaunchBatchHandler.class);
18
19 public Object execute(ExecutionEvent event) throws ExecutionException {
20 ProcessBuilderView pbView = (ProcessBuilderView) HandlerUtil
21 .getActiveWorkbenchWindow(event).getActivePage()
22 .findView(ProcessBuilderView.ID);
23 pbView.launchBatch();
24 return null;
25 }
26
27 }