01: /*******************************************************************************
02: * Copyright (c) 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor.text;
11:
12: import org.eclipse.jface.text.DocumentEvent;
13: import org.eclipse.jface.text.IRegion;
14: import org.eclipse.jface.text.ITypedRegion;
15: import org.eclipse.jface.text.TextAttribute;
16: import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
17: import org.eclipse.jface.text.rules.ITokenScanner;
18:
19: public class MultilineDamagerRepairer extends DefaultDamagerRepairer {
20:
21: public MultilineDamagerRepairer(ITokenScanner scanner,
22: TextAttribute defaultTextAttribute) {
23: super (scanner, defaultTextAttribute);
24: }
25:
26: public MultilineDamagerRepairer(ITokenScanner scanner) {
27: super (scanner);
28: }
29:
30: /* (non-Javadoc)
31: * @see org.eclipse.jface.text.presentation.IPresentationDamager#getDamageRegion(org.eclipse.jface.text.ITypedRegion, org.eclipse.jface.text.DocumentEvent, boolean)
32: */
33: public IRegion getDamageRegion(ITypedRegion partition,
34: DocumentEvent e, boolean documentPartitioningChanged) {
35: return partition;
36: }
37:
38: /**
39: * Configures the scanner's default return token. This is the text attribute
40: * which is returned when none is returned by the current token.
41: */
42: public void setDefaultTextAttribute(
43: TextAttribute defaultTextAttribute) {
44: fDefaultTextAttribute = defaultTextAttribute;
45: }
46:
47: }
|