KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > DocumentRewriteSessionType


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  *******************************************************************************/

11 package org.eclipse.jface.text;
12
13
14 /**
15  * A document rewrite session type.
16  * <p>
17  * Allowed values are:
18  * <ul>
19  * <li>{@link DocumentRewriteSessionType#UNRESTRICTED}</li>
20  * <li>{@link DocumentRewriteSessionType#UNRESTRICTED_SMALL} (since 3.3)</li>
21  * <li>{@link DocumentRewriteSessionType#SEQUENTIAL}</li>
22  * <li>{@link DocumentRewriteSessionType#STRICTLY_SEQUENTIAL}</li>
23  * </ul>
24  * </p>
25  *
26  * @see org.eclipse.jface.text.IDocument
27  * @see org.eclipse.jface.text.IDocumentExtension4
28  * @see org.eclipse.jface.text.IDocumentRewriteSessionListener
29  * @since 3.1
30  */

31 public class DocumentRewriteSessionType {
32
33     /**
34      * An unrestricted rewrite session is a sequence of unrestricted replace operations. This
35      * session type should only be used for <em>large</em> operations that touch more than about
36      * fifty lines. Use {@link #UNRESTRICTED_SMALL} for small operations.
37      */

38     public final static DocumentRewriteSessionType UNRESTRICTED= new DocumentRewriteSessionType();
39     /**
40      * An small unrestricted rewrite session is a short sequence of unrestricted replace operations.
41      * This should be used for changes that touch less than about fifty lines.
42      *
43      * @since 3.3
44      */

45     public final static DocumentRewriteSessionType UNRESTRICTED_SMALL= new DocumentRewriteSessionType();
46     /**
47      * A sequential rewrite session is a sequence of non-overlapping replace
48      * operations starting at an arbitrary document offset.
49      */

50     public final static DocumentRewriteSessionType SEQUENTIAL= new DocumentRewriteSessionType();
51     /**
52      * A strictly sequential rewrite session is a sequence of non-overlapping
53      * replace operations from the start of the document to its end.
54      */

55     public final static DocumentRewriteSessionType STRICTLY_SEQUENTIAL= new DocumentRewriteSessionType();
56
57
58     /**
59      * Prohibit external object creation.
60      */

61     private DocumentRewriteSessionType() {
62     }
63 }
64
Popular Tags