comparison 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
comparison
equal deleted inserted replaced
128:8df1d4193877 129:eb30df5ca28b
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.IDocumentAdapter;
14
15 import dwt.dwthelper.utils;
16
17
18 import dwt.custom.StyledTextContent;
19
20
21 /**
22 * Adapts an {@link dwtx.jface.text.IDocument}to the
23 * {@link dwt.custom.StyledTextContent} interface. The document
24 * adapter is used by {@link dwtx.jface.text.TextViewer} to translate
25 * document changes into styled text content changes and vice versa.
26 * <p>
27 * Clients may implement this interface and override
28 * <code>TextViewer.createDocumentAdapter</code> if they want to intercept the
29 * communication between the viewer's text widget and the viewer's document.
30 * <p>
31 * In order to provide backward compatibility for clients of
32 * <code>IDocumentAdapter</code>, extension interfaces are used as a means of
33 * evolution. The following extension interfaces exist:
34 * <ul>
35 * <li>{@link dwtx.jface.text.IDocumentAdapterExtension} since version
36 * 2.0 introducing a way of batching a sequence of document changes into a
37 * single styled text content notification</li>
38 * </ul>
39 *
40 * @see dwtx.jface.text.IDocumentAdapterExtension
41 * @see dwtx.jface.text.IDocument
42 */
43 public interface IDocumentAdapter : StyledTextContent {
44
45 /**
46 * Sets the adapters document.
47 *
48 * @param document the document to be adapted
49 */
50 void setDocument(IDocument document);
51 }