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.DocumentRewriteSession;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * A document rewrite session.
|
|
20 *
|
|
21 * @see dwtx.jface.text.IDocument
|
|
22 * @see dwtx.jface.text.IDocumentExtension4
|
|
23 * @see dwtx.jface.text.IDocumentRewriteSessionListener
|
|
24 * @since 3.1
|
|
25 */
|
|
26 public class DocumentRewriteSession {
|
|
27
|
|
28 private DocumentRewriteSessionType fSessionType;
|
|
29
|
|
30 /**
|
|
31 * Prohibit package external object creation.
|
|
32 *
|
|
33 * @param sessionType the type of this session
|
|
34 */
|
|
35 protected DocumentRewriteSession(DocumentRewriteSessionType sessionType) {
|
|
36 fSessionType= sessionType;
|
|
37 }
|
|
38
|
|
39 /**
|
|
40 * Returns the type of this session.
|
|
41 *
|
|
42 * @return the type of this session
|
|
43 */
|
|
44 public DocumentRewriteSessionType getSessionType() {
|
|
45 return fSessionType;
|
|
46 }
|
|
47
|
|
48 /*
|
|
49 * @see java.lang.Object#toString()
|
|
50 */
|
|
51 public String toString() {
|
|
52 return new StringBuffer().append(hashCode()).toString();
|
|
53 }
|
|
54 }
|