Mercurial > projects > dwt-addons
view dwtx/jface/text/IDocumentAdapter.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 |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2000, 2005 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 dwtx.jface.text.IDocumentAdapter; import dwt.dwthelper.utils; import dwt.custom.StyledTextContent; /** * Adapts an {@link dwtx.jface.text.IDocument}to the * {@link dwt.custom.StyledTextContent} interface. The document * adapter is used by {@link dwtx.jface.text.TextViewer} to translate * document changes into styled text content changes and vice versa. * <p> * Clients may implement this interface and override * <code>TextViewer.createDocumentAdapter</code> if they want to intercept the * communication between the viewer's text widget and the viewer's document. * <p> * In order to provide backward compatibility for clients of * <code>IDocumentAdapter</code>, extension interfaces are used as a means of * evolution. The following extension interfaces exist: * <ul> * <li>{@link dwtx.jface.text.IDocumentAdapterExtension} since version * 2.0 introducing a way of batching a sequence of document changes into a * single styled text content notification</li> * </ul> * * @see dwtx.jface.text.IDocumentAdapterExtension * @see dwtx.jface.text.IDocument */ public interface IDocumentAdapter : StyledTextContent { /** * Sets the adapters document. * * @param document the document to be adapted */ void setDocument(IDocument document); }