129
|
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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.IPositionUpdater;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * A position updater is responsible for adapting document positions. When
|
|
20 * installed on a document, the position updater updates the document's
|
|
21 * positions to changes applied to this document. Document updaters can be
|
|
22 * selective, i.e. they might only update positions of a certain category.
|
|
23 * <p>
|
|
24 * Position updaters are of primary importance for the definition of the
|
|
25 * semantics of positions.
|
|
26 * <p>
|
|
27 * Clients may implement this interface or use the standard implementation
|
|
28 * {@link dwtx.jface.text.DefaultPositionUpdater}.
|
|
29 * </p>
|
|
30 *
|
|
31 * @see dwtx.jface.text.IDocument
|
|
32 * @see dwtx.jface.text.Position
|
|
33 */
|
|
34 public interface IPositionUpdater {
|
|
35
|
|
36 /**
|
|
37 * Adapts positions to the change specified by the document event.
|
|
38 * It is ensured that the document's partitioning has been adapted to
|
|
39 * this document change and that all the position updaters which have
|
|
40 * a smaller index in the document's position updater list have been called.
|
|
41 *
|
|
42 * @param event the document event describing the document change
|
|
43 */
|
|
44 void update(DocumentEvent event);
|
|
45 }
|