KickJava   Java API By Example, From Geeks To Geeks.

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


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
12 package org.eclipse.ui.texteditor;
13
14
15 import org.eclipse.jface.action.IMenuListener;
16
17
18 /**
19  * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
20  * the following functions:
21  * <ul>
22  * <li> status fields
23  * <li> read-only state of the editor's input
24  * <li> ruler context menu listeners.
25  * </ul>
26  *
27  * @since 2.0
28  */

29 public interface ITextEditorExtension {
30
31     /**
32      * Informs the editor which status field is to be used when posting status
33      * information in the given category.
34      *
35      * @param field the status field to be used
36      * @param category the status information category
37      * @see ITextEditorActionConstants
38      */

39     void setStatusField(IStatusField field, String JavaDoc category);
40
41     /**
42      * Returns whether the editor's input is read-only. The semantics of
43      * this method is orthogonal to <code>isEditable</code> as it talks about the
44      * editor input, i.e. the domain element, and <b>not</b> about the editor
45      * document.
46      *
47      * @return <code>true</code> if the editor input is read-only
48      */

49     boolean isEditorInputReadOnly();
50
51     /**
52      * Adds a ruler context menu listener to the editor.
53      *
54      * @param listener the listener
55      */

56     void addRulerContextMenuListener(IMenuListener listener);
57
58     /**
59      * Removes a ruler context menu listener from the editor.
60      *
61      * @param listener the listener
62      */

63     void removeRulerContextMenuListener(IMenuListener listener);
64 }
65
66
Popular Tags