KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Extension interface for {@link org.eclipse.jface.text.ILineTracker}. Adds the
15  * concept of rewrite sessions. A rewrite session is a sequence of replace
16  * operations that form a semantic unit.
17  *
18  * @since 3.1
19  */

20 public interface ILineTrackerExtension {
21
22     /**
23      * Tells the line tracker that a rewrite session started. A rewrite session
24      * is a sequence of replace operations that form a semantic unit. The line
25      * tracker is allowed to use that information for internal optimization.
26      *
27      * @param session the rewrite session
28      * @throws IllegalStateException in case there is already an active rewrite
29      * session
30      */

31     void startRewriteSession(DocumentRewriteSession session) throws IllegalStateException JavaDoc;
32
33     /**
34      * Tells the line tracker that the rewrite session has finished. This method
35      * is only called when <code>startRewriteSession</code> has been called
36      * before. The text resulting from the rewrite session is passed to the line
37      * tracker.
38      *
39      * @param session the rewrite session
40      * @param text the text with which to re-initialize the line tracker
41      */

42     void stopRewriteSession(DocumentRewriteSession session, String JavaDoc text);
43 }
44
Popular Tags