KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ltk > core > refactoring > IUndoManagerListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ltk.core.refactoring;
12
13 import org.eclipse.ltk.core.refactoring.history.IRefactoringExecutionListener;
14
15 /**
16  * Listener to monitor state changes of an {@link IUndoManager}.
17  * <p>
18  * Clients may implement this interface to listen to undo manger changes.
19  * </p>
20  * <p>
21  * As of 3.2 clients which need to examine refactorings which have been performed, undone or redone should use
22  * {@link IRefactoringExecutionListener} for enhanced functionality.
23  * </p>
24  *
25  * @since 3.0
26  */

27 public interface IUndoManagerListener {
28     
29     /**
30      * This method is called by the undo manager if the undo stack has
31      * changed (for example a undo object got added or the undo stack
32      * got flushed).
33      *
34      * @param manager the manager this listener is registered to
35      */

36     public void undoStackChanged(IUndoManager manager);
37     
38     /**
39      * This method is called by the undo manager if the redo stack has
40      * changed (for example a redo object got added or the redo stack
41      * got flushed).
42      *
43      * @param manager the manager this listener is registered to
44      */

45     public void redoStackChanged(IUndoManager manager);
46     
47     /**
48      * This method gets called by the undo manager if a change gets
49      * executed in the context of the undo manager.
50      *
51      * @param manager the manager this listener is registered to
52      * @param change the change to be executed
53      */

54     public void aboutToPerformChange(IUndoManager manager, Change change);
55     
56     /**
57      * This method gets called by the undo manager when a change has
58      * been executed in the context of the undo manager.
59      *
60      * @param manager the manager this listener is registered to
61      * @param change the change that has been executed
62      */

63     public void changePerformed(IUndoManager manager, Change change);
64 }
65
Popular Tags