1
|
/*******************************************************************************
|
2
|
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
3
|
* All rights reserved. This program and the accompanying materials
|
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
5
|
* which accompanies this distribution, and is available at
|
6
|
* http://www.eclipse.org/legal/epl-v10.html
|
7
|
*
|
8
|
* Contributors:
|
9
|
* IBM Corporation - initial API and implementation
|
10
|
*******************************************************************************/
|
11
|
package org.eclipse.gef.commands;
|
12
|
|
13
|
/**
|
14
|
* A Command which can never be executed
|
15
|
*/
|
16
|
public final class UnexecutableCommand extends Command {
|
17
|
|
18
|
/**
|
19
|
* The singleton instance
|
20
|
*/
|
21
|
public static final UnexecutableCommand INSTANCE = new UnexecutableCommand();
|
22
|
|
23
|
private UnexecutableCommand() {
|
24
|
}
|
25
|
|
26
|
/**
|
27
|
* @return <code>false</code>
|
28
|
*/
|
29
|
public boolean canExecute() {
|
30
|
return false;
|
31
|
}
|
32
|
|
33
|
/**
|
34
|
* @return <code>false</code>
|
35
|
*/
|
36
|
public boolean canUndo() {
|
37
|
return false;
|
38
|
}
|
39
|
|
40
|
}
|