Mercurial > projects > dwt-addons
comparison dwtx/jface/text/reconciler/IReconciler.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
comparison
equal
deleted
inserted
replaced
128:8df1d4193877 | 129:eb30df5ca28b |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2008 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.reconciler.IReconciler; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 import dwtx.jface.text.ITextViewer; | |
18 | |
19 | |
20 /** | |
21 * An <code>IReconciler</code> defines and maintains a model of the content | |
22 * of the text viewer's document in the presence of changes applied to this | |
23 * document. An <code>IReconciler</code> is a {@link dwtx.jface.text.ITextViewer} add-on. | |
24 * <p> | |
25 * Reconcilers are assumed to be asynchronous, i.e. they allow a certain | |
26 * temporal window of inconsistency between the document and the model of | |
27 * the content of this document. | |
28 * </p> | |
29 * <p> | |
30 * Reconcilers have a list of {@link dwtx.jface.text.reconciler.IReconcilingStrategy} | |
31 * objects each of which is registered for a particular document content type. | |
32 * The reconciler uses the strategy objects to react on the changes applied | |
33 * to the text viewer's document. | |
34 *</p> | |
35 * <p> | |
36 * In order to provide backward compatibility for clients of <code>IReconciler</code>, extension | |
37 * interfaces are used to provide a means of evolution. The following extension interfaces exist: | |
38 * <ul> | |
39 * <li>{@link dwtx.jface.text.reconciler.IReconcilerExtension} since version 3.0 introducing | |
40 * the ability to be aware of documents with multiple partitionings.</li> | |
41 * </ul> | |
42 * </p> | |
43 * <p> | |
44 * The interface can be implemented by clients. By default, clients use | |
45 * {@link dwtx.jface.text.reconciler.MonoReconciler} or | |
46 * {@link dwtx.jface.text.reconciler.Reconciler} as the standard | |
47 * implementers of this interface. | |
48 * </p> | |
49 * | |
50 * @see ITextViewer | |
51 * @see IReconcilingStrategy | |
52 */ | |
53 public interface IReconciler { | |
54 | |
55 /** | |
56 * Installs the reconciler on the given text viewer. After this method has been | |
57 * finished, the reconciler is operational, i.e., it works without requesting | |
58 * further client actions until <code>uninstall</code> is called. | |
59 * | |
60 * @param textViewer the viewer on which the reconciler is installed | |
61 */ | |
62 void install(ITextViewer textViewer); | |
63 | |
64 /** | |
65 * Removes the reconciler from the text viewer it has | |
66 * previously been installed on. | |
67 */ | |
68 void uninstall(); | |
69 | |
70 /** | |
71 * Returns the reconciling strategy registered with the reconciler | |
72 * for the specified content type. | |
73 * | |
74 * @param contentType the content type for which to determine the reconciling strategy | |
75 * @return the reconciling strategy registered for the given content type, or | |
76 * <code>null</code> if there is no such strategy | |
77 */ | |
78 IReconcilingStrategy getReconcilingStrategy(String contentType); | |
79 } |