All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jface.text.rules.IRule Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.text.rules;


/**
 * Defines the interface for a rule used in the scanning of text for the purpose of document
 * partitioning or text styling.
 *
 * Originally since unknown version, but moved to org.eclipse.text in 3.14
 *
 * @since 3.14
 * @see ICharacterScanner
 */
public interface IRule {

	/**
	 * Evaluates the rule by examining the characters available from the provided character scanner.
	 * The token returned by this rule returns true when calling
	 * isUndefined, if the text that the rule investigated does not match the rule's
	 * requirements
	 *
	 * @param scanner the character scanner to be used by this rule
	 * @return the token computed by the rule
	 */
	IToken evaluate(ICharacterScanner scanner);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy