org.eclipse.mtl.ide.ui.editors.template.scanner
Class MTLBlockScanner

java.lang.Object
  extended by org.eclipse.jface.text.rules.RuleBasedScanner
      extended by org.eclipse.mtl.ide.ui.editors.template.scanner.AbstractMTLScanner
          extended by org.eclipse.mtl.ide.ui.editors.template.scanner.MTLBlockScanner
All Implemented Interfaces:
org.eclipse.jface.text.rules.ICharacterScanner, org.eclipse.jface.text.rules.ITokenScanner
Direct Known Subclasses:
MTLForScanner, MTLIfScanner, MTLLetScanner

public class MTLBlockScanner
extends AbstractMTLScanner

A scanner for detecting block sequences.


Field Summary
 
Fields inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
fColumn, fDefaultReturnToken, fDelimiters, fDocument, fOffset, fRangeEnd, fRules, fTokenOffset, UNDEFINED
 
Fields inherited from interface org.eclipse.jface.text.rules.ICharacterScanner
EOF
 
Constructor Summary
MTLBlockScanner(ColorManager manager)
          Constructor.
MTLBlockScanner(ColorManager manager, boolean italic)
          Constructor.
 
Method Summary
 java.lang.String getConfiguredContentType()
          Returns the type of the tokens read by this scanner.
protected  org.eclipse.jface.text.rules.Token getDefaultReturnToken(ColorManager manager, boolean italic)
          Gets the default token of the scanner.
protected  org.eclipse.jface.text.rules.IRule[] getRules(ColorManager manager, boolean italic)
          Gets the rules of the scanner.
 
Methods inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, nextToken, read, setDefaultReturnToken, setRange, setRules, unread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTLBlockScanner

public MTLBlockScanner(ColorManager manager)
Constructor.

Parameters:
manager - is the color manager

MTLBlockScanner

public MTLBlockScanner(ColorManager manager,
                       boolean italic)
Constructor.

Parameters:
manager - is the color manager
italic - indicates if the italic style must be used
Method Detail

getRules

protected org.eclipse.jface.text.rules.IRule[] getRules(ColorManager manager,
                                                        boolean italic)
Gets the rules of the scanner.

Parameters:
manager - is the color manager
italic - indicates if the italic style must be used
Returns:
the rules of the scanner

getDefaultReturnToken

protected org.eclipse.jface.text.rules.Token getDefaultReturnToken(ColorManager manager,
                                                                   boolean italic)
Gets the default token of the scanner.

Parameters:
manager - is the color manager
italic - indicates if the italic style must be used
Returns:
the default token

getConfiguredContentType

public java.lang.String getConfiguredContentType()
Returns the type of the tokens read by this scanner.

Specified by:
getConfiguredContentType in class AbstractMTLScanner
Returns:
the type of the tokens
See Also:
AbstractMTLScanner.getConfiguredContentType()

Copyright 2008 Obeo
All Rights Reserved.