1 17 package org.eclipse.emf.common.command; 18 19 20 import org.eclipse.emf.common.CommonPlugin; 21 22 23 26 public class UnexecutableCommand extends AbstractCommand 27 { 28 31 public static final UnexecutableCommand INSTANCE = new UnexecutableCommand(); 32 33 36 private UnexecutableCommand() 37 { 38 super 39 (CommonPlugin.INSTANCE.getString("_UI_UnexecutableCommand_label"), 40 CommonPlugin.INSTANCE.getString("_UI_UnexecutableCommand_description")); 41 } 42 43 47 public boolean canExecute() 48 { 49 return false; 50 } 51 52 56 public void execute() 57 { 58 throw 59 new UnsupportedOperationException 60 (CommonPlugin.INSTANCE.getString("_EXC_Method_not_implemented", new String [] { this.getClass().getName() + ".execute()" })); 61 } 62 63 67 public boolean canUndo() 68 { 69 return false; 70 } 71 72 76 public void redo() 77 { 78 throw 79 new UnsupportedOperationException 80 (CommonPlugin.INSTANCE.getString("_EXC_Method_not_implemented", new String [] { this.getClass().getName() + ".redo()" })); 81 } 82 } 83 | Popular Tags |