KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > IExecutionListenerWithChecks


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 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
12 package org.eclipse.core.commands;
13
14 import org.eclipse.core.commands.common.NotDefinedException;
15
16 /**
17  * <p>
18  * A listener to the execution of commands. This listener will be notified if
19  * someone tries to execute a command and it is not enabled or not defined. The
20  * listener also be notified if a command is about to execute, and when that
21  * execution completes. It is not possible for the listener to prevent the
22  * execution, only to respond to it in some way.
23  * </p>
24  * <p>
25  * Clients may implement, but must not extend.
26  * </p>
27  *
28  * @since 3.2
29  */

30 public interface IExecutionListenerWithChecks extends IExecutionListener {
31
32     /**
33      * Notifies the listener that an attempt was made to execute a command that
34      * is not defined.
35      *
36      * @param commandId
37      * The identifier of command that is not defined; never
38      * <code>null</code>
39      * @param exception
40      * The exception that occurred; never <code>null</code>.
41      */

42     public void notDefined(String JavaDoc commandId, NotDefinedException exception);
43
44     /**
45      * Notifies the listener that an attempt was made to execute a command that
46      * is disabled.
47      *
48      * @param commandId
49      * The identifier of command that is not enabled; never
50      * <code>null</code>
51      * @param exception
52      * The exception that occurred; never <code>null</code>.
53      */

54     public void notEnabled(String JavaDoc commandId, NotEnabledException exception);
55 }
56
Popular Tags