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.ILineTrackerExtension;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17 /**
|
|
18 * Extension interface for {@link dwtx.jface.text.ILineTracker}. Adds the
|
|
19 * concept of rewrite sessions. A rewrite session is a sequence of replace
|
|
20 * operations that form a semantic unit.
|
|
21 *
|
|
22 * @since 3.1
|
|
23 */
|
|
24 public interface ILineTrackerExtension {
|
|
25
|
|
26 /**
|
|
27 * Tells the line tracker that a rewrite session started. A rewrite session
|
|
28 * is a sequence of replace operations that form a semantic unit. The line
|
|
29 * tracker is allowed to use that information for internal optimization.
|
|
30 *
|
|
31 * @param session the rewrite session
|
|
32 * @throws IllegalStateException in case there is already an active rewrite
|
|
33 * session
|
|
34 */
|
|
35 void startRewriteSession(DocumentRewriteSession session) throws IllegalStateException;
|
|
36
|
|
37 /**
|
|
38 * Tells the line tracker that the rewrite session has finished. This method
|
|
39 * is only called when <code>startRewriteSession</code> has been called
|
|
40 * before. The text resulting from the rewrite session is passed to the line
|
|
41 * tracker.
|
|
42 *
|
|
43 * @param session the rewrite session
|
|
44 * @param text the text with which to re-initialize the line tracker
|
|
45 */
|
|
46 void stopRewriteSession(DocumentRewriteSession session, String text);
|
|
47 }
|