KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > texteditor > IDocumentProviderExtension4


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.texteditor;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.content.IContentType;
15
16
17 /**
18  * Extension interface for {@link org.eclipse.ui.texteditor.IDocumentProvider}.
19  * Extends a document provider with the ability to query the content type
20  * of a given element.
21  * <p>
22  * This interface may be implemented by clients.
23  * </p>
24  *
25  * @see org.eclipse.ui.texteditor.IDocumentProvider
26  * @since 3.1
27  */

28 public interface IDocumentProviderExtension4 {
29
30     /**
31      * Returns the content type of for the given element or
32      * <code>null</code> if none could be determined. If the element's
33      * document can be saved, the returned content type is determined by the
34      * document's current content.
35      *
36      * @param element the element
37      * @return the content type or <code>null</code>
38      * @throws CoreException if reading or accessing the underlying store
39      * fails
40      */

41     IContentType getContentType(Object JavaDoc element) throws CoreException;
42 }
43
Popular Tags