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