1 | package de.uka.ipd.sdq.pcm.gmf.usage.helper; |
2 | |
3 | import org.eclipse.core.commands.ExecutionException; |
4 | import org.eclipse.core.runtime.IAdaptable; |
5 | import org.eclipse.core.runtime.IProgressMonitor; |
6 | import org.eclipse.gmf.runtime.common.core.command.AbstractCommand; |
7 | import org.eclipse.gmf.runtime.common.core.command.CommandResult; |
8 | |
9 | public class CanceledCommand extends AbstractCommand { |
10 | |
11 | public CanceledCommand() { |
12 | super("Canceled Command"); |
13 | } |
14 | |
15 | @Override |
16 | protected CommandResult doExecuteWithResult( |
17 | IProgressMonitor progressMonitor, IAdaptable info) |
18 | throws ExecutionException { |
19 | return CommandResult.newCancelledCommandResult(); |
20 | } |
21 | |
22 | @Override |
23 | protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, |
24 | IAdaptable info) throws ExecutionException { |
25 | return CommandResult.newCancelledCommandResult(); |
26 | } |
27 | |
28 | @Override |
29 | protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, |
30 | IAdaptable info) throws ExecutionException { |
31 | return CommandResult.newCancelledCommandResult(); |
32 | } |
33 | |
34 | } |