Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 2520feaef92f85e98d3e090208df09d0d2a898f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/****************************************************************************
 * Copyright (c) 2008 Composent, Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Composent, Inc. - initial API and implementation
 *****************************************************************************/

package org.eclipse.ecf.sync.doc;

import org.eclipse.ecf.sync.IModelChange;

/**
 * Local document change.  Instances of this class represent
 * local changes to a replicated document. 
 */
public interface IDocumentChange extends IModelChange {
	/**
	 * Get offset in document where change has or will occur.
	 * @return int the offset
	 */
	public int getOffset();

	/**
	 * Get length of text that was replaced.  
	 * @return length of replaced text
	 */
	public int getLengthOfReplacedText();

	/**
	 * Get the new text.
	 * @return String text.  Will not return <code>null</code>, but
	 * may return empty string.
	 */
	public String getText();
}

Back to the top