129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2005 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.ISelectionValidator;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 import dwtx.jface.viewers.ISelection;
|
|
19
|
|
20
|
|
21 /**
|
|
22 * A selection validator allows clients to test whether the selection they
|
|
23 * received during selection changed notification is valid.
|
|
24 * <p>
|
|
25 * For example, selection and document changes that occur between the original
|
|
26 * selection and the point in time the validator is called cause the selection
|
|
27 * to be invalid.</p>
|
|
28 * <p>
|
|
29 * Clients may implement and use this interface.
|
|
30 * </p>
|
|
31 *
|
|
32 * @since 3.0
|
|
33 */
|
|
34 public interface ISelectionValidator {
|
|
35
|
|
36 /**
|
|
37 * Tests whether the given post selection is still valid.
|
|
38 *
|
|
39 * @param selection
|
|
40 * @return <code>true</code> if the selection is still valid
|
|
41 */
|
|
42 bool isValid(ISelection selection);
|
|
43 }
|