KickJava   Java API By Example, From Geeks To Geeks.

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


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 package org.eclipse.core.commands.operations;
12
13 /**
14  * IContextReplacingOperation defines an interface for undoable operations that
15  * can replace one undo context with another undo context. It is used by
16  * operations, such as composite operations, where removing and adding an undo
17  * context would not have the same semantic as replacing one undo context with
18  * another.
19  *
20  * @since 3.2
21  *
22  */

23 public interface IContextReplacingOperation {
24
25     /**
26      * Replace the undo context of the receiver with the provided replacement
27      * undo context.
28      * <p>
29      * This message has no effect if the original undo context is not present in
30      * the receiver.
31      *
32      * @param original the undo context which is to be replaced
33      * @param replacement the undo context which is replacing the original
34      *
35      */

36     void replaceContext(IUndoContext original, IUndoContext replacement);
37 }
38
Popular Tags