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
|
|
14 module dwtx.jface.text.rules.RuleBasedDamagerRepairer;
|
|
15
|
|
16 import dwt.dwthelper.utils;
|
|
17
|
|
18
|
|
19 import dwtx.jface.text.TextAttribute;
|
|
20
|
|
21
|
|
22 /**
|
|
23 * @deprecated use <code>DefaultDamagerRepairer</code>
|
|
24 */
|
|
25 public class RuleBasedDamagerRepairer : DefaultDamagerRepairer {
|
|
26
|
|
27 /**
|
|
28 * Creates a damager/repairer that uses the given scanner and returns the given default
|
|
29 * text attribute if the current token does not carry a text attribute.
|
|
30 *
|
|
31 * @param scanner the rule based scanner to be used
|
|
32 * @param defaultTextAttribute the text attribute to be returned if none is specified by the current token,
|
|
33 * may not be <code>null</code>
|
|
34 *
|
|
35 * @deprecated use RuleBasedDamagerRepairer(RuleBasedScanner) instead
|
|
36 */
|
|
37 public RuleBasedDamagerRepairer(RuleBasedScanner scanner, TextAttribute defaultTextAttribute) {
|
|
38 super(scanner, defaultTextAttribute);
|
|
39 }
|
|
40
|
|
41 /**
|
|
42 * Creates a damager/repairer that uses the given scanner. The scanner may not be <code>null</code>
|
|
43 * and is assumed to return only token that carry text attributes.
|
|
44 *
|
|
45 * @param scanner the rule based scanner to be used, may not be <code>null</code>
|
|
46 * @since 2.0
|
|
47 */
|
|
48 public RuleBasedDamagerRepairer(RuleBasedScanner scanner) {
|
|
49 super(scanner);
|
|
50 }
|
|
51 }
|
|
52
|
|
53
|