KickJava   Java API By Example, From Geeks To Geeks.

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


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

11 package org.eclipse.jface.text;
12
13
14 /**
15  * A document rewrite session.
16  *
17  * @see org.eclipse.jface.text.IDocument
18  * @see org.eclipse.jface.text.IDocumentExtension4
19  * @see org.eclipse.jface.text.IDocumentRewriteSessionListener
20  * @since 3.1
21  */

22 public class DocumentRewriteSession {
23
24     private DocumentRewriteSessionType fSessionType;
25
26     /**
27      * Prohibit package external object creation.
28      *
29      * @param sessionType the type of this session
30      */

31     protected DocumentRewriteSession(DocumentRewriteSessionType sessionType) {
32         fSessionType= sessionType;
33     }
34
35     /**
36      * Returns the type of this session.
37      *
38      * @return the type of this session
39      */

40     public DocumentRewriteSessionType getSessionType() {
41         return fSessionType;
42     }
43
44     /*
45      * @see java.lang.Object#toString()
46      */

47     public String JavaDoc toString() {
48         return new StringBuffer JavaDoc().append(hashCode()).toString();
49     }
50 }
51
Popular Tags