Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b655dbf58830336428c496c9fddbeb4f3feef04d (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**********************************************************************
Copyright (c) 2000, 2004 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Common Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/cpl-v10.html

Contributors:
	IBM Corporation - Initial implementation
**********************************************************************/
package org.eclipse.core.filebuffers;


import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.IAnnotationModel;

/**
 * A text file buffer is a file buffer for text files. The contents of a text
 * file buffer is given in the form of a document and an associated annotation
 * model. Also, the text file buffer provides methods to manage the character
 * encoding used to read and write the buffer's underlying text file.
 * 
 * @since 3.0
 */
public interface ITextFileBuffer extends IFileBuffer {
	
	/**
	 * Returns the document of this text file buffer.
	 * 
	 * @return the document of this text file buffer
	 */
	IDocument getDocument();
	
	/**
	 * Returns the character encoding to be used for reading and writing the
	 * buffer's underlying file.
	 * 
	 * @return the character encoding
	 */
	String getEncoding();
	
	/**
	 * Sets the character encoding to be used for reading and writing the buffer's
	 * underlying file.
	 * 
	 * @param encoding the encoding
	 */
	void setEncoding(String encoding);
	
	/**
	 * Returns the annotation model of this text file buffer.
	 * 
	 * @return the annotation model of this text file buffer
	 */
	IAnnotationModel getAnnotationModel();
}

Back to the top