Skip to main content
summaryrefslogtreecommitdiffstats
blob: 061be33e9352609ab24938c443c2c46876118934 (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
57
58
59
60
61
62
63
64
65
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.ui.texteditor;


import org.eclipse.jface.action.IMenuListener;


/**
 * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
 * the following functions:
 * <ul>
 * <li> status fields
 * <li> read-only state of the editor's input
 * <li> ruler context menu listeners.
 * </ul>
 *
 * @since 2.0
 */
public interface ITextEditorExtension {

	/**
	 * Informs the editor which status field is to be used when posting status
	 * information  in the given category.
	 *
	 * @param field the status field to be used
	 * @param category the status information category
	 * @see ITextEditorActionConstants
	 */
	void setStatusField(IStatusField field, String category);

	/**
	 * Returns whether the editor's input is read-only. The semantics of
	 * this method is orthogonal to <code>isEditable</code> as it talks about the
	 * editor input, i.e. the domain element, and <b>not</b> about the editor
	 * document.
	 *
	 * @return <code>true</code> if the editor input is read-only
	 */
	boolean isEditorInputReadOnly();

	/**
	 * Adds a ruler context menu listener to the editor.
	 *
	 * @param listener the listener
	 */
	void addRulerContextMenuListener(IMenuListener listener);

	/**
	 * Removes a ruler context menu listener from the editor.
	 *
	 * @param listener the listener
	 */
	void removeRulerContextMenuListener(IMenuListener listener);
}

Back to the top