Skip to main content
summaryrefslogtreecommitdiffstats
blob: 8ad7c0a1de133025cf775cbfc78858a488ef56a2 (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
/*******************************************************************************
 * Copyright (c) 2015 Holger Voormann 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:
 *     Holger Voormann - initial API and implementation
 *     Florian Weßling <flo@cdhq.de> - Word Wrap - https://bugs.eclipse.org/bugs/show_bug.cgi?id=35779
 *******************************************************************************/
package org.eclipse.ui.texteditor;

/**
 * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds the following
 * functions:
 * <ul>
 * <li>word wrap</li>
 * </ul>
 * <p>
 * This interface may be implemented by clients.
 * </p>
 *
 * @since 3.10
 */
public interface ITextEditorExtension6 {

	/**
	 * Returns <code>true</code> if word wrap is currently enabled, <code>false</code> otherwise.
	 *
	 * @return the receiver's word wrap state
	 */
	boolean isWordWrapEnabled();

	/**
	 * Sets whether the text editor wraps lines. Nothing happens if the receiver already is in the
	 * requested state.
	 * <p>
	 * Note: enabling word wrap disables block selection mode (see {@link ITextEditorExtension5}),
	 * enabling block selection mode will disable word wrap.
	 *
	 * @param enable <code>true</code> to enable word wrap, <code>false</code> to turn it off.
	 *
	 * @see ITextEditorExtension5#setBlockSelectionMode(boolean)
	 */
	public void setWordWrap(boolean enable);
}

Back to the top