KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > ISelectionValidator


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  *******************************************************************************/

11 package org.eclipse.jface.text;
12
13
14 import org.eclipse.jface.viewers.ISelection;
15
16
17 /**
18  * A selection validator allows clients to test whether the selection they
19  * received during selection changed notification is valid.
20  * <p>
21  * For example, selection and document changes that occur between the original
22  * selection and the point in time the validator is called cause the selection
23  * to be invalid.</p>
24  * <p>
25  * Clients may implement and use this interface.
26  * </p>
27  *
28  * @since 3.0
29  */

30 public interface ISelectionValidator {
31
32     /**
33      * Tests whether the given post selection is still valid.
34      *
35      * @param selection
36      * @return <code>true</code> if the selection is still valid
37      */

38     boolean isValid(ISelection selection);
39 }
40
Popular Tags