Mercurial > projects > dwt2
comparison org.eclipse.core.commands/src/org/eclipse/core/commands/IObjectWithState.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 | |
14 module org.eclipse.core.commands.IObjectWithState; | |
15 | |
16 import org.eclipse.core.commands.State; | |
17 | |
18 import java.lang.all; | |
19 | |
20 /** | |
21 * <p> | |
22 * An object that holds zero or more state objects. This state information can | |
23 * be shared between different instances of <code>IObjectWithState</code>. | |
24 * </p> | |
25 * <p> | |
26 * Clients may implement, but must not extend this interface. | |
27 * </p> | |
28 * | |
29 * @see AbstractHandlerWithState | |
30 * @since 3.2 | |
31 */ | |
32 public interface IObjectWithState { | |
33 | |
34 /** | |
35 * Adds state to this object. | |
36 * | |
37 * @param id | |
38 * The identifier indicating the type of state being added; must | |
39 * not be <code>null</code>. | |
40 * @param state | |
41 * The new state to add to this object; must not be | |
42 * <code>null</code>. | |
43 */ | |
44 public void addState(String id, State state); | |
45 | |
46 /** | |
47 * Gets the state with the given id. | |
48 * | |
49 * @param stateId | |
50 * The identifier of the state to retrieve; must not be | |
51 * <code>null</code>. | |
52 * @return The state; may be <code>null</code> if there is no state with | |
53 * the given id. | |
54 */ | |
55 public State getState(String stateId); | |
56 | |
57 /** | |
58 * Gets the identifiers for all of the state associated with this object. | |
59 * | |
60 * @return All of the state identifiers; may be empty, but never | |
61 * <code>null</code>. | |
62 */ | |
63 public String[] getStateIds(); | |
64 | |
65 /** | |
66 * Removes state from this object. | |
67 * | |
68 * @param stateId | |
69 * The id of the state to remove from this object; must not be | |
70 * <code>null</code>. | |
71 */ | |
72 public void removeState(String stateId); | |
73 } |