KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > operations > ICompositeOperation


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  *******************************************************************************/

11 package org.eclipse.core.commands.operations;
12
13 /**
14  * <p>
15  * ICompositeOperation defines an undoable operation that is composed of child
16  * operations. Requests to execute, undo, or redo a composite result in the the
17  * execution, undo, or redo of the composite as a whole. Similarly, a request to
18  * dispose the composite should result in all child operations being disposed.
19  * </p>
20  *
21  * @since 3.1
22  */

23 public interface ICompositeOperation extends IUndoableOperation {
24
25     /**
26      * <p>
27      * Add the specified operation as a child of this operation.
28      * </p>
29      *
30      * @param operation
31      * the operation to be added. If the operation instance has
32      * already been added, this method will have no effect.
33      */

34     void add(IUndoableOperation operation);
35
36     /**
37      * <p>
38      * Remove the specified operation from this operation.
39      * </p>
40      * <p>
41      * The composite operation should dispose the operation as part of removing
42      * it.
43      * </p>
44      *
45      * @param operation
46      * the operation to be removed. The operation should be disposed
47      * by the receiver. This method will have no effect if the
48      * operation instance is not already a child.
49      */

50     void remove(IUndoableOperation operation);
51 }
52
Popular Tags