comparison org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconciler.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
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 org.eclipse.jface.text.reconciler.IReconciler;
14
15 import org.eclipse.jface.text.reconciler.DirtyRegionQueue; // packageimport
16 import org.eclipse.jface.text.reconciler.IReconcilingStrategy; // packageimport
17 import org.eclipse.jface.text.reconciler.AbstractReconcileStep; // packageimport
18 import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension; // packageimport
19 import org.eclipse.jface.text.reconciler.MonoReconciler; // packageimport
20 import org.eclipse.jface.text.reconciler.IReconcileStep; // packageimport
21 import org.eclipse.jface.text.reconciler.AbstractReconciler; // packageimport
22 import org.eclipse.jface.text.reconciler.Reconciler; // packageimport
23 import org.eclipse.jface.text.reconciler.IReconcilableModel; // packageimport
24 import org.eclipse.jface.text.reconciler.DirtyRegion; // packageimport
25 import org.eclipse.jface.text.reconciler.IReconcileResult; // packageimport
26 import org.eclipse.jface.text.reconciler.IReconcilerExtension; // packageimport
27
28
29 import java.lang.all;
30
31 import org.eclipse.jface.text.ITextViewer;
32
33
34 /**
35 * An <code>IReconciler</code> defines and maintains a model of the content
36 * of the text viewer's document in the presence of changes applied to this
37 * document. An <code>IReconciler</code> is a {@link org.eclipse.jface.text.ITextViewer} add-on.
38 * <p>
39 * Reconcilers are assumed to be asynchronous, i.e. they allow a certain
40 * temporal window of inconsistency between the document and the model of
41 * the content of this document.
42 * </p>
43 * <p>
44 * Reconcilers have a list of {@link org.eclipse.jface.text.reconciler.IReconcilingStrategy}
45 * objects each of which is registered for a particular document content type.
46 * The reconciler uses the strategy objects to react on the changes applied
47 * to the text viewer's document.
48 *</p>
49 * <p>
50 * In order to provide backward compatibility for clients of <code>IReconciler</code>, extension
51 * interfaces are used to provide a means of evolution. The following extension interfaces exist:
52 * <ul>
53 * <li>{@link org.eclipse.jface.text.reconciler.IReconcilerExtension} since version 3.0 introducing
54 * the ability to be aware of documents with multiple partitionings.</li>
55 * </ul>
56 * </p>
57 * <p>
58 * The interface can be implemented by clients. By default, clients use
59 * {@link org.eclipse.jface.text.reconciler.MonoReconciler} or
60 * {@link org.eclipse.jface.text.reconciler.Reconciler} as the standard
61 * implementers of this interface.
62 * </p>
63 *
64 * @see ITextViewer
65 * @see IReconcilingStrategy
66 */
67 public interface IReconciler {
68
69 /**
70 * Installs the reconciler on the given text viewer. After this method has been
71 * finished, the reconciler is operational, i.e., it works without requesting
72 * further client actions until <code>uninstall</code> is called.
73 *
74 * @param textViewer the viewer on which the reconciler is installed
75 */
76 void install(ITextViewer textViewer);
77
78 /**
79 * Removes the reconciler from the text viewer it has
80 * previously been installed on.
81 */
82 void uninstall();
83
84 /**
85 * Returns the reconciling strategy registered with the reconciler
86 * for the specified content type.
87 *
88 * @param contentType the content type for which to determine the reconciling strategy
89 * @return the reconciling strategy registered for the given content type, or
90 * <code>null</code> if there is no such strategy
91 */
92 IReconcilingStrategy getReconcilingStrategy(String contentType);
93 }