Skip to main content
summaryrefslogtreecommitdiffstats
blob: 16dc1d59f05c9c7bf2b46d3f3ec1f2dda377d47c (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
/*******************************************************************************
 * 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.jface.text;


import org.eclipse.jface.viewers.ISelection;


/**
 * A selection validator allows clients to test whether the selection they
 * received during selection changed notification is valid.
 * <p>
 * For example, selection and document changes that occur between the original
 * selection and the point in time the validator is called cause the selection
 * to be invalid.</p>
 * <p>
 * Clients may implement and use this interface.
 * </p>
 *
 * @since 3.0
 */
public interface ISelectionValidator {

	/**
	 * Tests whether the given post selection is still valid.
	 *
	 * @param selection
	 * @return <code>true</code> if the selection is still valid
	 */
	boolean isValid(ISelection selection);
}

Back to the top