KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > editors > text > IStorageDocumentProvider


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.ui.editors.text;
12
13
14 /**
15  * Document provider for {@link org.eclipse.core.resources.IStorage} based domain elements.
16  * Basically incorporates the concept of character encoding.
17  *
18  * @since 2.0
19  */

20 public interface IStorageDocumentProvider {
21
22     /**
23      * Returns the default character encoding used by this provider.
24      *
25      * @return the default character encoding used by this provider
26      */

27     String JavaDoc getDefaultEncoding();
28
29     /**
30      * Returns the character encoding for the given element, or
31      * <code>null</code> if the element is not managed by this provider.
32      *
33      * @param element the element
34      * @return the encoding for the given element
35      */

36     String JavaDoc getEncoding(Object JavaDoc element);
37
38     /**
39      * Sets the encoding for the given element. If <code>encoding</code>
40      * is <code>null</code> the workbench's character encoding should be used.
41      *
42      * @param element the element
43      * @param encoding the encoding to be used
44      */

45     void setEncoding(Object JavaDoc element, String JavaDoc encoding);
46 }
47
Popular Tags