org.eclipse.mtl.ide.ui.editors.template
Class MTLPairMatcher

java.lang.Object
  extended by org.eclipse.jface.text.source.DefaultCharacterPairMatcher
      extended by org.eclipse.mtl.ide.ui.editors.template.MTLPairMatcher
All Implemented Interfaces:
org.eclipse.jface.text.source.ICharacterPairMatcher

public class MTLPairMatcher
extends org.eclipse.jface.text.source.DefaultCharacterPairMatcher

Helper class for match pairs of special characters.


Field Summary
protected  org.eclipse.jface.text.source.DefaultCharacterPairMatcher aggregatedMatcher
          The aggregated matcher, it is used for trivial block matching.
protected static char[] BLOCKS
          Blocks used by aggregated the matcher.
 
Fields inherited from interface org.eclipse.jface.text.source.ICharacterPairMatcher
LEFT, RIGHT
 
Constructor Summary
MTLPairMatcher(MTLEditor editor)
          Constructor.
 
Method Summary
 org.eclipse.jface.text.IRegion match(org.eclipse.jface.text.IDocument document, int offset)
          
 
Methods inherited from class org.eclipse.jface.text.source.DefaultCharacterPairMatcher
clear, dispose, getAnchor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCKS

protected static final char[] BLOCKS
Blocks used by aggregated the matcher.


aggregatedMatcher

protected org.eclipse.jface.text.source.DefaultCharacterPairMatcher aggregatedMatcher
The aggregated matcher, it is used for trivial block matching.

Constructor Detail

MTLPairMatcher

public MTLPairMatcher(MTLEditor editor)
Constructor.

Parameters:
editor - is the editor
Method Detail

match

public org.eclipse.jface.text.IRegion match(org.eclipse.jface.text.IDocument document,
                                            int offset)

Specified by:
match in interface org.eclipse.jface.text.source.ICharacterPairMatcher
Overrides:
match in class org.eclipse.jface.text.source.DefaultCharacterPairMatcher
See Also:
DefaultCharacterPairMatcher.match(org.eclipse.jface.text.IDocument, int)

Copyright 2008 Obeo
All Rights Reserved.