01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.text;
11:
12: /**
13: * A document rewrite session type.
14: * <p>
15: * Allowed values are:
16: * <ul>
17: * <li>{@link DocumentRewriteSessionType#UNRESTRICTED}</li>
18: * <li>{@link DocumentRewriteSessionType#UNRESTRICTED_SMALL} (since 3.3)</li>
19: * <li>{@link DocumentRewriteSessionType#SEQUENTIAL}</li>
20: * <li>{@link DocumentRewriteSessionType#STRICTLY_SEQUENTIAL}</li>
21: * </ul>
22: * </p>
23: *
24: * @see org.eclipse.jface.text.IDocument
25: * @see org.eclipse.jface.text.IDocumentExtension4
26: * @see org.eclipse.jface.text.IDocumentRewriteSessionListener
27: * @since 3.1
28: */
29: public class DocumentRewriteSessionType {
30:
31: /**
32: * An unrestricted rewrite session is a sequence of unrestricted replace operations. This
33: * session type should only be used for <em>large</em> operations that touch more than about
34: * fifty lines. Use {@link #UNRESTRICTED_SMALL} for small operations.
35: */
36: public final static DocumentRewriteSessionType UNRESTRICTED = new DocumentRewriteSessionType();
37: /**
38: * An small unrestricted rewrite session is a short sequence of unrestricted replace operations.
39: * This should be used for changes that touch less than about fifty lines.
40: *
41: * @since 3.3
42: */
43: public final static DocumentRewriteSessionType UNRESTRICTED_SMALL = new DocumentRewriteSessionType();
44: /**
45: * A sequential rewrite session is a sequence of non-overlapping replace
46: * operations starting at an arbitrary document offset.
47: */
48: public final static DocumentRewriteSessionType SEQUENTIAL = new DocumentRewriteSessionType();
49: /**
50: * A strictly sequential rewrite session is a sequence of non-overlapping
51: * replace operations from the start of the document to its end.
52: */
53: public final static DocumentRewriteSessionType STRICTLY_SEQUENTIAL = new DocumentRewriteSessionType();
54:
55: /**
56: * Prohibit external object creation.
57: */
58: private DocumentRewriteSessionType() {
59: }
60: }
|