Package org.eclipse.m2m.atl.adt.ui.text.atl

# Class AtlCodeScanner

java.lang.Object
org.eclipse.jface.text.rules.RuleBasedScanner
org.eclipse.m2m.atl.adt.ui.text.AbstractScanner
org.eclipse.m2m.atl.adt.ui.text.atl.AtlCodeScanner

All Implemented Interfaces:
  `org.eclipse.jface.text.rules.ICharacterScanner`, `org.eclipse.jface.text.rules.ITokenScanner`

public class AtlCodeScanner extends AbstractScanner
This class controls the highlight syntaxing coloration for the ATL editor.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`AtlCodeScanner.EnumLiteralRule`
Rule to detect atl literals.
`class`
`AtlCodeScanner.IdentifierRule`
Rule to detect atl identifier.
`protected class`
`AtlCodeScanner.SymbolRule`
Rule to detect symbols.

## 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

Constructors
Constructor
Description
`AtlCodeScanner(AtlTextTools textTools)`
Creates a new instance of the ATL scanner.

## Method Summary

Modifier and Type
Method
Description
`void`
`adaptToPreferenceChange(org.eclipse.jface.util.PropertyChangeEvent event)`
`boolean`
`affectsBehavior(org.eclipse.jface.util.PropertyChangeEvent event)`
`protected List<org.eclipse.jface.text.rules.IRule>`
`createRules()`
Creates the list of rules controlling this scanner.
`protected String[]`
`getPropertyNames()`
Returns a list of constants matching the token.

### Methods inherited from class org.eclipse.m2m.atl.adt.ui.text.AbstractScanner

`getTextTools, getToken, initialize`

### 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 Details

### AtlCodeScanner

public AtlCodeScanner(AtlTextTools textTools)
Creates a new instance of the ATL scanner.

Parameters:
  `textTools` - the ATL text tools

## Method Details

### adaptToPreferenceChange

public void adaptToPreferenceChange(org.eclipse.jface.util.PropertyChangeEvent event)

Overrides:
  `adaptToPreferenceChange` in class `AbstractScanner`
See Also:
  - `AbstractScanner.adaptToPreferenceChange(org.eclipse.jface.util.PropertyChangeEvent)`

### affectsBehavior

public boolean affectsBehavior(org.eclipse.jface.util.PropertyChangeEvent event)

Overrides:
  `affectsBehavior` in class `AbstractScanner`
See Also:
  - `AbstractScanner.affectsBehavior(org.eclipse.jface.util.PropertyChangeEvent)`

### createRules

protected List<org.eclipse.jface.text.rules.IRule> createRules()
Creates the list of rules controlling this scanner.

Specified by:
  `createRules` in class `AbstractScanner`
Returns:
  the list of rules
See Also:
  - `AbstractScanner.createRules()`

### getPropertyNames

protected String[] getPropertyNames()
Returns a list of constants matching the token.

Specified by:
  `getPropertyNames` in class `AbstractScanner`
Returns:
  the list of constants
See Also:
  - `AbstractScanner.getPropertyNames()`