01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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: /**
13: * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
14: * the following functions:
15: * <ul>
16: * <li>insert mode management</li>
17: * </ul>
18: *
19: * @since 3.0
20: */
21: public interface ITextEditorExtension3 {
22:
23: /**
24: * Constitutes entities to enumerate the editor insert modes.
25: */
26: public static class InsertMode {
27: private InsertMode() {
28: }
29: }
30:
31: /**
32: * Represents the non-smart insert mode.
33: */
34: final static InsertMode INSERT = new InsertMode();
35: /**
36: * Represents the smart insert mode.
37: */
38: final static InsertMode SMART_INSERT = new InsertMode();
39:
40: /**
41: * Returns the current input mode of this editor.
42: *
43: * @return the current input mode of this editor
44: */
45: InsertMode getInsertMode();
46:
47: /**
48: * Sets the insert mode of this editor.
49: *
50: * @param mode the new insert mode
51: * @exception IllegalArgumentException if <code>mode</code> is not a legal insert mode for this editor
52: */
53: void setInsertMode(InsertMode mode);
54:
55: /**
56: * Sets the display of quick diff information.
57: *
58: * @param show <code>true</code> if quick diff information should be shown, <code>false</code> otherwise
59: */
60: void showChangeInformation(boolean show);
61:
62: /**
63: * Returns the quick diff display state.
64: *
65: * @return <code>true</code> if quick diff info is displayed, <code>false</code> otherwise
66: */
67: boolean isChangeInformationShowing();
68: }
|