Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 596db8c7df34d8aea5082f3461f12b4ed422cefe (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*******************************************************************************
 * Copyright (c) 2000, 2014 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
 *     vogella GmbH  - Bug 287303 - [patch] Add Word Wrap action to Console View
 *******************************************************************************/
package org.eclipse.ui.console;

import org.eclipse.ui.IViewPart;

/**
 * A view that displays consoles registered with the console manager.
 * @since 3.0
 * @noimplement This interface is not intended to be implemented by clients.
 * @noextend This interface is not intended to be extended by clients.
 */
public interface IConsoleView extends IViewPart, IScrollLockStateProvider {

	/**
	 * Displays the page for the given console in this console view.
	 * Has no effect if this console view has a pinned console.
	 *
	 * @param console console to display, cannot be <code>null</code>
	 */
	public void display(IConsole console);

	/**
	 * Pins this console view. No other console page will be displayed until
	 * this console view is un-pinned.
	 *
	 * @param pin <code>true</code> to pin the current console to the
	 * top of the stack, <code>false</code> otherwise
	 * @since 3.1
	 */
	public void setPinned(boolean pin);

	/**
	 * Displays and pins the given console in this console view. No
	 * other console can be displayed until this console view is
	 * un-pinned. Specifying <code>null</code> un-pins this console
	 *
	 * @param console console to pin, or <code>null</code> to un-pin
	 * @deprecated rather than pinning a specific console, a console view is
	 *  pinned - use <code>setPinned(boolean)</code>
	 */
	@Deprecated
	public void pin(IConsole console);

	/**
	 * Returns whether this console view is currently pinned to a
	 * specific console.
	 *
	 * @return whether this console view is currently pinned to a
	 *  specific console
	 */
	public boolean isPinned();

	/**
	 * Returns the console currently being displayed, or <code>null</code>
	 * if none
	 *
	 * @return the console currently being displayed, or <code>null</code>
	 *  if none
	 */
	public IConsole getConsole();

	/**
	 * Warns that the content of the given console has changed.
	 *
	 * @param console the console that has changed
	 */
	public void warnOfContentChange(IConsole console);

	/**
	 * Sets the scroll lock state of the currently active console.
	 *
	 * @param scrollLock <code>true</code> to turn scroll lock on, otherwise <code>false</code>
	 * @since 3.1
	 */
	@Override
	public void setScrollLock(boolean scrollLock);

	/**
	 * Returns the scroll lock state of the currently active console.
	 *
	 * @return <code>true</code> if scroll lock is on, <code>false</code> otherwise
	 * @since 3.1
	 */
	@Override
	public boolean getScrollLock();

	/**
	 * Sets the word wrap state of the currently active console.
	 *
	 * @param wordWrap <code>true</code> to turn word wrap on, otherwise
	 *            <code>false</code>
	 * @since 3.6
	 */
	public void setWordWrap(boolean wordWrap);

	/**
	 * Returns the word wrap state of the currently active console.
	 *
	 * @return <code>true</code> if word wrap is on, <code>false</code>
	 *         otherwise
	 * @since 3.6
	 */
	public boolean getWordWrap();

}

Back to the top