KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > rules > RuleBasedDamagerRepairer


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
12 package org.eclipse.jface.text.rules;
13
14
15 import org.eclipse.jface.text.TextAttribute;
16
17
18 /**
19  * @deprecated use <code>DefaultDamagerRepairer</code>
20  */

21 public class RuleBasedDamagerRepairer extends DefaultDamagerRepairer {
22
23     /**
24      * Creates a damager/repairer that uses the given scanner and returns the given default
25      * text attribute if the current token does not carry a text attribute.
26      *
27      * @param scanner the rule based scanner to be used
28      * @param defaultTextAttribute the text attribute to be returned if none is specified by the current token,
29      * may not be <code>null</code>
30      *
31      * @deprecated use RuleBasedDamagerRepairer(RuleBasedScanner) instead
32      */

33     public RuleBasedDamagerRepairer(RuleBasedScanner scanner, TextAttribute defaultTextAttribute) {
34         super(scanner, defaultTextAttribute);
35     }
36
37     /**
38      * Creates a damager/repairer that uses the given scanner. The scanner may not be <code>null</code>
39      * and is assumed to return only token that carry text attributes.
40      *
41      * @param scanner the rule based scanner to be used, may not be <code>null</code>
42      * @since 2.0
43      */

44     public RuleBasedDamagerRepairer(RuleBasedScanner scanner) {
45         super(scanner);
46     }
47 }
48
49
50
Popular Tags