01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.texteditor;
11:
12: import org.eclipse.jface.action.IMenuListener;
13:
14: /**
15: * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
16: * the following functions:
17: * <ul>
18: * <li> status fields
19: * <li> read-only state of the editor's input
20: * <li> ruler context menu listeners.
21: * </ul>
22: *
23: * @since 2.0
24: */
25: public interface ITextEditorExtension {
26:
27: /**
28: * Informs the editor which status field is to be used when posting status
29: * information in the given category.
30: *
31: * @param field the status field to be used
32: * @param category the status information category
33: * @see ITextEditorActionConstants
34: */
35: void setStatusField(IStatusField field, String category);
36:
37: /**
38: * Returns whether the editor's input is read-only. The semantics of
39: * this method is orthogonal to <code>isEditable</code> as it talks about the
40: * editor input, i.e. the domain element, and <b>not</b> about the editor
41: * document.
42: *
43: * @return <code>true</code> if the editor input is read-only
44: */
45: boolean isEditorInputReadOnly();
46:
47: /**
48: * Adds a ruler context menu listener to the editor.
49: *
50: * @param listener the listener
51: */
52: void addRulerContextMenuListener(IMenuListener listener);
53:
54: /**
55: * Removes a ruler context menu listener from the editor.
56: *
57: * @param listener the listener
58: */
59: void removeRulerContextMenuListener(IMenuListener listener);
60: }
|