KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > texteditor > IElementStateListener


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.ui.texteditor;
12
13
14 /**
15  * Interface for parties interested in standardized element changes. These
16  * changes are:
17  * <ul>
18  * <li> dirty state changes
19  * <li> content replacements
20  * <li> moves
21  * <li> deletions
22  * </ul>
23  * The notifications sent to the element state listeners inform about those standardized,
24  * abstract changes. The concrete change applied might differ from the one the listeners
25  * are notified about, but should be interpreted as the one the listeners receive.
26  * <p>
27  * In order to provided backward compatibility for clients of <code>IElementStateListener</code>,
28  * extension interfaces are used to provide a means of evolution. The following extension interface
29  * exists:
30  * <ul>
31  * <li>{@link org.eclipse.ui.texteditor.IElementStateListenerExtension} since version 2.0 introducing
32  * state validation events.</li>
33  * </ul>
34  * </p>
35  *
36  * @see org.eclipse.ui.texteditor.IElementStateListenerExtension
37  */

38 public interface IElementStateListener {
39
40     /**
41      * Notifies that the dirty state of the given element has changed.
42      *
43      * @param element the element
44      * @param isDirty the new dirty state
45      */

46     void elementDirtyStateChanged(Object JavaDoc element, boolean isDirty);
47
48     /**
49      * Notifies that the content of the given element is about to be replaced.
50      *
51      * @param element the element
52      */

53     void elementContentAboutToBeReplaced(Object JavaDoc element);
54
55     /**
56      * Notifies that the content of the given element has been replaced.
57      *
58      * @param element the element
59      */

60     void elementContentReplaced(Object JavaDoc element);
61
62     /**
63      * Notifies that the given element has been deleted.
64      *
65      * @param element the element
66      */

67     void elementDeleted(Object JavaDoc element);
68
69     /**
70      * Notifies that the element has moved. If <code>movedElement</code>
71      * is <code>null</code> it is similar to <code>elementDeleted(originalElement)</code>.
72      *
73      * @param originalElement the element before the move
74      * @param movedElement the element after the move
75      */

76     void elementMoved(Object JavaDoc originalElement, Object JavaDoc movedElement);
77 }
78
Popular Tags