Mercurial > projects > dwt2
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/IReconciler.d Sat Mar 14 18:23:29 2009 +0100 @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module org.eclipse.jface.text.reconciler.IReconciler; + +import org.eclipse.jface.text.reconciler.DirtyRegionQueue; // packageimport +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; // packageimport +import org.eclipse.jface.text.reconciler.AbstractReconcileStep; // packageimport +import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension; // packageimport +import org.eclipse.jface.text.reconciler.MonoReconciler; // packageimport +import org.eclipse.jface.text.reconciler.IReconcileStep; // packageimport +import org.eclipse.jface.text.reconciler.AbstractReconciler; // packageimport +import org.eclipse.jface.text.reconciler.Reconciler; // packageimport +import org.eclipse.jface.text.reconciler.IReconcilableModel; // packageimport +import org.eclipse.jface.text.reconciler.DirtyRegion; // packageimport +import org.eclipse.jface.text.reconciler.IReconcileResult; // packageimport +import org.eclipse.jface.text.reconciler.IReconcilerExtension; // packageimport + + +import java.lang.all; + +import org.eclipse.jface.text.ITextViewer; + + +/** + * An <code>IReconciler</code> defines and maintains a model of the content + * of the text viewer's document in the presence of changes applied to this + * document. An <code>IReconciler</code> is a {@link org.eclipse.jface.text.ITextViewer} add-on. + * <p> + * Reconcilers are assumed to be asynchronous, i.e. they allow a certain + * temporal window of inconsistency between the document and the model of + * the content of this document. + * </p> + * <p> + * Reconcilers have a list of {@link org.eclipse.jface.text.reconciler.IReconcilingStrategy} + * objects each of which is registered for a particular document content type. + * The reconciler uses the strategy objects to react on the changes applied + * to the text viewer's document. + *</p> + * <p> + * In order to provide backward compatibility for clients of <code>IReconciler</code>, extension + * interfaces are used to provide a means of evolution. The following extension interfaces exist: + * <ul> + * <li>{@link org.eclipse.jface.text.reconciler.IReconcilerExtension} since version 3.0 introducing + * the ability to be aware of documents with multiple partitionings.</li> + * </ul> + * </p> + * <p> + * The interface can be implemented by clients. By default, clients use + * {@link org.eclipse.jface.text.reconciler.MonoReconciler} or + * {@link org.eclipse.jface.text.reconciler.Reconciler} as the standard + * implementers of this interface. + * </p> + * + * @see ITextViewer + * @see IReconcilingStrategy + */ +public interface IReconciler { + + /** + * Installs the reconciler on the given text viewer. After this method has been + * finished, the reconciler is operational, i.e., it works without requesting + * further client actions until <code>uninstall</code> is called. + * + * @param textViewer the viewer on which the reconciler is installed + */ + void install(ITextViewer textViewer); + + /** + * Removes the reconciler from the text viewer it has + * previously been installed on. + */ + void uninstall(); + + /** + * Returns the reconciling strategy registered with the reconciler + * for the specified content type. + * + * @param contentType the content type for which to determine the reconciling strategy + * @return the reconciling strategy registered for the given content type, or + * <code>null</code> if there is no such strategy + */ + IReconcilingStrategy getReconcilingStrategy(String contentType); +}