01: /**
02: *
03: */package net.refractions.udig.project.internal.commands;
04:
05: import net.refractions.udig.project.command.AbstractCommand;
06: import net.refractions.udig.project.command.MapCommand;
07: import net.refractions.udig.project.command.UndoableCommand;
08: import net.refractions.udig.project.command.UndoableMapCommand;
09:
10: import org.eclipse.core.runtime.IProgressMonitor;
11:
12: /**
13: * This command does nothing it simply. If undone it will undo the previous command so it it
14: * effectively invisible on the stack
15: * @author jeichar
16: *
17: */
18: public class NullCommand extends AbstractCommand implements MapCommand,
19: UndoableMapCommand, UndoableCommand {
20:
21: /* (non-Javadoc)
22: * @see net.refractions.udig.project.command.Command#run(org.eclipse.core.runtime.IProgressMonitor)
23: */
24: public void run(IProgressMonitor monitor) throws Exception {
25: // do nothing
26: }
27:
28: /* (non-Javadoc)
29: * @see net.refractions.udig.project.command.Command#getName()
30: */
31: public String getName() {
32: return null;
33: }
34:
35: public void rollback(IProgressMonitor monitor) throws Exception {
36: getMap().undo();
37: }
38:
39: }
|