KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > IPositionUpdater


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.jface.text;
12
13
14 /**
15  * A position updater is responsible for adapting document positions. When
16  * installed on a document, the position updater updates the document's
17  * positions to changes applied to this document. Document updaters can be
18  * selective, i.e. they might only update positions of a certain category.
19  * <p>
20  * Position updaters are of primary importance for the definition of the
21  * semantics of positions.
22  * <p>
23  * Clients may implement this interface or use the standard implementation
24  * {@link org.eclipse.jface.text.DefaultPositionUpdater}.
25  * </p>
26  *
27  * @see org.eclipse.jface.text.IDocument
28  * @see org.eclipse.jface.text.Position
29  */

30 public interface IPositionUpdater {
31
32     /**
33      * Adapts positions to the change specified by the document event.
34      * It is ensured that the document's partitioning has been adapted to
35      * this document change and that all the position updaters which have
36      * a smaller index in the document's position updater list have been called.
37      *
38      * @param event the document event describing the document change
39      */

40     void update(DocumentEvent event);
41 }
42
Popular Tags