Package de.innovationgate.eclipse.editors.tml

Source Code of de.innovationgate.eclipse.editors.tml.TMLEndTagContentScanner

/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     Innovation Gate GmbH - initial API and implementation
******************************************************************************/
package de.innovationgate.eclipse.editors.tml;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WhitespaceRule;

import de.innovationgate.eclipse.editors.helpers.TextStyles;
import de.innovationgate.eclipse.editors.helpers.WhitespaceDetector;

/**
* scans the content of an tml end tag
*
*
*/
public class TMLEndTagContentScanner extends RuleBasedScanner {

  public TMLEndTagContentScanner() {
    IToken tag = new Token(TextStyles.STYLE_TML_TAG);   
   
   
    List<IRule> rules = new ArrayList<IRule>();
   
    rules.add(new SingleLineRule("<", ">", tag));
   
    rules.add(new WhitespaceRule(new WhitespaceDetector()));

    setRules(rules.toArray(new IRule[0]));
  }
}
TOP

Related Classes of de.innovationgate.eclipse.editors.tml.TMLEndTagContentScanner

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.