01: package net.refractions.udig.internal.ui.operations;
02:
03: import net.refractions.udig.internal.ui.UiPlugin;
04: import net.refractions.udig.ui.operations.OpAction;
05:
06: import org.eclipse.jface.action.Action;
07: import org.eclipse.jface.window.Window;
08: import org.eclipse.swt.widgets.Display;
09:
10: public class RunOperationsAction extends Action {
11:
12: @Override
13: public void run() {
14: RunOperationDialog dialog = new RunOperationDialog(Display
15: .getDefault().getActiveShell(), UiPlugin.getDefault()
16: .getOperationMenuFactory());
17:
18: dialog.open();
19:
20: if (dialog.getReturnCode() == Window.CANCEL)
21: return;
22:
23: final OpAction[] actions = dialog.getSelection();
24: for (OpAction action : actions) {
25: action.run();
26: }
27: }
28: }
|