Mercurial > projects > dwt-addons
comparison dwtx/core/commands/IExecutionListener.d @ 3:6518c18a01f7
eclipse.core package without osgi dependencies
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 26 Mar 2008 00:57:19 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:a012107a911c | 3:6518c18a01f7 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2005 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 ******************************************************************************/ | |
13 | |
14 module dwtx.core.commands.IExecutionListener; | |
15 | |
16 import dwtx.core.commands.NotHandledException; | |
17 import dwtx.core.commands.ExecutionException; | |
18 import dwtx.core.commands.ExecutionEvent; | |
19 | |
20 import dwt.dwthelper.utils; | |
21 | |
22 /** | |
23 * <p> | |
24 * A listener to the execution of commands. This listener will be notified if a | |
25 * command is about to execute, and when that execution completes. It is not | |
26 * possible for the listener to prevent the execution, only to respond to it in | |
27 * some way. | |
28 * </p> | |
29 * | |
30 * @since 3.1 | |
31 */ | |
32 public interface IExecutionListener { | |
33 | |
34 /** | |
35 * Notifies the listener that an attempt was made to execute a command with | |
36 * no handler. | |
37 * | |
38 * @param commandId | |
39 * The identifier of command that is not handled; never | |
40 * <code>null</code> | |
41 * @param exception | |
42 * The exception that occurred; never <code>null</code>. | |
43 */ | |
44 public void notHandled(String commandId, NotHandledException exception); | |
45 | |
46 /** | |
47 * Notifies the listener that a command has failed to complete execution. | |
48 * | |
49 * @param commandId | |
50 * The identifier of the command that has executed; never | |
51 * <code>null</code>. | |
52 * @param exception | |
53 * The exception that occurred; never <code>null</code>. | |
54 */ | |
55 public void postExecuteFailure(String commandId, | |
56 ExecutionException exception); | |
57 | |
58 /** | |
59 * Notifies the listener that a command has completed execution | |
60 * successfully. | |
61 * | |
62 * @param commandId | |
63 * The identifier of the command that has executed; never | |
64 * <code>null</code>. | |
65 * @param returnValue | |
66 * The return value from the command; may be <code>null</code>. | |
67 */ | |
68 public void postExecuteSuccess(String commandId, Object returnValue); | |
69 | |
70 /** | |
71 * Notifies the listener that a command is about to execute. | |
72 * | |
73 * @param commandId | |
74 * The identifier of the command that is about to execute, never | |
75 * <code>null</code>. | |
76 * @param event | |
77 * The event that will be passed to the <code>execute</code> | |
78 * method; never <code>null</code>. | |
79 */ | |
80 public void preExecute(String commandId, ExecutionEvent event); | |
81 } |