129
|
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.IRewriteTarget;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * A target publishing the required functions to modify a document that is displayed
|
|
20 * in a text viewer. It provides access to the document and control
|
|
21 * over the redraw behavior and the grouping of document changes into undo commands.
|
|
22 *
|
|
23 * @see dwtx.jface.text.ITextViewer
|
|
24 * @see dwtx.jface.text.IDocument
|
|
25 * @see dwtx.jface.text.IUndoManager
|
|
26 * @since 2.0
|
|
27 */
|
|
28 public interface IRewriteTarget {
|
|
29
|
|
30 /**
|
|
31 * Returns the document of this target.
|
|
32 *
|
|
33 * @return the document of this target
|
|
34 */
|
|
35 IDocument getDocument();
|
|
36
|
|
37 /**
|
|
38 * Disables/enables redrawing while modifying the target's document.
|
|
39 *
|
|
40 * @param redraw <code>true</code> if the document's visible presentation
|
|
41 * should be updated, <code>false</code> otherwise
|
|
42 */
|
|
43 void setRedraw(bool redraw);
|
|
44
|
|
45 /**
|
|
46 * If an undo manager is connected to the document's visible presentation,
|
|
47 * this method tells the undo manager to fold all subsequent changes into
|
|
48 * one single undo command until <code>endCompoundChange</code> is called.
|
|
49 */
|
|
50 void beginCompoundChange();
|
|
51
|
|
52 /**
|
|
53 * If an undo manager is connected to the document's visible presentation,
|
|
54 * this method tells the undo manager to stop the folding of changes into a
|
|
55 * single undo command. After this call, all subsequent changes are
|
|
56 * considered to be individually undo-able.
|
|
57 */
|
|
58 void endCompoundChange();
|
|
59 }
|
|
60
|