129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2006 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.DocumentRewriteSessionType;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * A document rewrite session type.
|
|
20 * <p>
|
|
21 * Allowed values are:
|
|
22 * <ul>
|
|
23 * <li>{@link DocumentRewriteSessionType#UNRESTRICTED}</li>
|
|
24 * <li>{@link DocumentRewriteSessionType#UNRESTRICTED_SMALL} (since 3.3)</li>
|
|
25 * <li>{@link DocumentRewriteSessionType#SEQUENTIAL}</li>
|
|
26 * <li>{@link DocumentRewriteSessionType#STRICTLY_SEQUENTIAL}</li>
|
|
27 * </ul>
|
|
28 * </p>
|
|
29 *
|
|
30 * @see dwtx.jface.text.IDocument
|
|
31 * @see dwtx.jface.text.IDocumentExtension4
|
|
32 * @see dwtx.jface.text.IDocumentRewriteSessionListener
|
|
33 * @since 3.1
|
|
34 */
|
|
35 public class DocumentRewriteSessionType {
|
|
36
|
|
37 /**
|
|
38 * An unrestricted rewrite session is a sequence of unrestricted replace operations. This
|
|
39 * session type should only be used for <em>large</em> operations that touch more than about
|
|
40 * fifty lines. Use {@link #UNRESTRICTED_SMALL} for small operations.
|
|
41 */
|
|
42 public final static DocumentRewriteSessionType UNRESTRICTED= new DocumentRewriteSessionType();
|
|
43 /**
|
|
44 * An small unrestricted rewrite session is a short sequence of unrestricted replace operations.
|
|
45 * This should be used for changes that touch less than about fifty lines.
|
|
46 *
|
|
47 * @since 3.3
|
|
48 */
|
|
49 public final static DocumentRewriteSessionType UNRESTRICTED_SMALL= new DocumentRewriteSessionType();
|
|
50 /**
|
|
51 * A sequential rewrite session is a sequence of non-overlapping replace
|
|
52 * operations starting at an arbitrary document offset.
|
|
53 */
|
|
54 public final static DocumentRewriteSessionType SEQUENTIAL= new DocumentRewriteSessionType();
|
|
55 /**
|
|
56 * A strictly sequential rewrite session is a sequence of non-overlapping
|
|
57 * replace operations from the start of the document to its end.
|
|
58 */
|
|
59 public final static DocumentRewriteSessionType STRICTLY_SEQUENTIAL= new DocumentRewriteSessionType();
|
|
60
|
|
61
|
|
62 /**
|
|
63 * Prohibit external object creation.
|
|
64 */
|
|
65 private DocumentRewriteSessionType() {
|
|
66 }
|
|
67 }
|