com.aptana.ide.lexer.matcher
Class ToDelimiterMatcher

java.lang.Object
  extended by com.aptana.xml.NodeBase
      extended by com.aptana.ide.lexer.matcher.model.MatcherElement
          extended by com.aptana.ide.lexer.matcher.AbstractTextMatcher
              extended by com.aptana.ide.lexer.matcher.ToDelimiterMatcher
All Implemented Interfaces:
ITextMatcher, IMatcherElement, INode, java.lang.Comparable

public class ToDelimiterMatcher
extends AbstractTextMatcher

Author:
Kevin Lindsey

Constructor Summary
ToDelimiterMatcher()
          ToDelimiterMatcher
ToDelimiterMatcher(java.lang.String delimiter)
          ToDelimiterMatcher
 
Method Summary
 void addChildTypes()
          addChildTypes
 void addFirstCharacters(MatcherMap map, ITextMatcher target)
          This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.
 boolean canMatchNothing()
          Return a flag indicating if this matcher can return a positive match without consuming characters
protected  void createChildrenTokens(ITokenList tokenList)
          createChildrenTokens
 ITextMatcher getDelimiter()
          getDelimiter
 boolean getIncludeDelimiter()
          getIncludeDelimiter
 boolean getMatchEndOfFile()
          getMatchEndOfFile
 int match(char[] source, int offset, int eofOffset)
          Gets the ending position of the match starting at the offset.
 void setIncludeDelimiter(boolean value)
          setIncludeDelimiter
 void setMatchEndOfFile(boolean value)
          setMatchEndOfFile
protected  void validateLocal()
          validateLocalAttributes
 
Methods inherited from class com.aptana.ide.lexer.matcher.AbstractTextMatcher
accept, accept, addFirstCharacters, addNameValueChangeListener, createToken, getExpressionRoot, getMatchedToken, getName, getNameValue, getToken, removeNameValueChangeListener, setMatchedToken, setName, setNameValue, setParent, setToken, toString, wrapChildrenInAndElement
 
Methods inherited from class com.aptana.ide.lexer.matcher.model.MatcherElement
appendChild, createTokens, getCategory, getGroup, getSwitchTo, getType, getTypeDefinedInSubtree, setCategory, setGroup, setSwitchTo, setType, validate, validateChildren
 
Methods inherited from class com.aptana.xml.NodeBase
addChildType, appendText, compareTo, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, removeChildType, setColumnNumber, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.aptana.xml.INode
appendChild, appendText, getChild, getChildCount, getColumnNumber, getDocument, getLineNumber, getParent, getText, removeChild, setColumnNumber, setLineNumber
 

Constructor Detail

ToDelimiterMatcher

public ToDelimiterMatcher()
ToDelimiterMatcher


ToDelimiterMatcher

public ToDelimiterMatcher(java.lang.String delimiter)
ToDelimiterMatcher

Parameters:
delimiter -
Method Detail

addChildTypes

public void addChildTypes()
Description copied from class: AbstractTextMatcher
addChildTypes

Specified by:
addChildTypes in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addChildTypes()

addFirstCharacters

public void addFirstCharacters(MatcherMap map,
                               ITextMatcher target)
Description copied from interface: ITextMatcher
This functions the same as addFirstCharacter(MatcherMap); however, the matcher that will use this matcher's first character as a possible transition is specified in the target parameter.

Specified by:
addFirstCharacters in interface ITextMatcher
Overrides:
addFirstCharacters in class AbstractTextMatcher
See Also:
AbstractTextMatcher.addFirstCharacters(com.aptana.ide.lexer.matcher.MatcherMap, com.aptana.ide.lexer.matcher.ITextMatcher)

canMatchNothing

public boolean canMatchNothing()
Description copied from interface: ITextMatcher
Return a flag indicating if this matcher can return a positive match without consuming characters

Specified by:
canMatchNothing in interface ITextMatcher
Overrides:
canMatchNothing in class AbstractTextMatcher
Returns:
boolean
See Also:
AbstractTextMatcher.canMatchNothing()

createChildrenTokens

protected void createChildrenTokens(ITokenList tokenList)
Description copied from class: MatcherElement
createChildrenTokens

Overrides:
createChildrenTokens in class MatcherElement
See Also:
MatcherElement.createChildrenTokens(com.aptana.ide.lexer.ITokenList)

match

public int match(char[] source,
                 int offset,
                 int eofOffset)
Description copied from interface: ITextMatcher
Gets the ending position of the match starting at the offset. Return -1 if no match occured.

Specified by:
match in interface ITextMatcher
Specified by:
match in class AbstractTextMatcher
Parameters:
source - character array to walk
offset - offset into array
eofOffset - end of file offset
Returns:
Returns the offset where the match ended or -1 if no match occurred
See Also:
AbstractTextMatcher.match(char[], int, int)

getDelimiter

public ITextMatcher getDelimiter()
getDelimiter

Returns:
IMatcher

getIncludeDelimiter

public boolean getIncludeDelimiter()
getIncludeDelimiter

Returns:
boolean

getMatchEndOfFile

public boolean getMatchEndOfFile()
getMatchEndOfFile

Returns:
boolean

setIncludeDelimiter

public void setIncludeDelimiter(boolean value)
setIncludeDelimiter

Parameters:
value -

setMatchEndOfFile

public void setMatchEndOfFile(boolean value)
setMatchEndOfFile

Parameters:
value -

validateLocal

protected void validateLocal()
Description copied from class: MatcherElement
validateLocalAttributes

Overrides:
validateLocal in class AbstractTextMatcher
See Also:
AbstractTextMatcher.validateLocal()