|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.sqltools.sqleditor.internal.matching.AbstractPairMatcher
public abstract class AbstractPairMatcher
Abstract token matcher which provides token matching methods and some abstract methods to dedicate themselves to
complete matching methods.
If you want to support token matching for a specific SQL language, you need to extend this class, and implements all
abstract methods as its function target.
Field Summary |
---|
Fields inherited from interface org.eclipse.jface.text.source.ICharacterPairMatcher |
---|
LEFT, RIGHT |
Constructor Summary | |
---|---|
AbstractPairMatcher(IMatchingPairs matchingPairs)
|
Method Summary | |
---|---|
void |
clear()
|
void |
dispose()
|
int |
getAnchor()
|
abstract int |
getMatchingTokenLength()
Getting the token of the token which matches with the selected token. |
abstract int |
getMatchingTokenStartOffset(java.lang.String token,
int start,
boolean forward,
java.lang.String text)
Getting the start offset of the matching token. |
abstract java.lang.String |
getOriginalToken(java.lang.String text,
int offset)
Getting the token according to selected position. |
abstract int |
getOriginalTokenEndOffset(java.lang.String text,
int offset)
Getting the end offset of selected token. |
abstract int |
getOriginalTokenLength()
Getting the length of the token which is get from getOriginalToken method. |
SQLEditor |
getSQLEditor()
|
org.eclipse.jface.text.IRegion |
match(org.eclipse.jface.text.IDocument doc,
int offset)
|
void |
setSQLEditor(SQLEditor editor)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractPairMatcher(IMatchingPairs matchingPairs)
Method Detail |
---|
public void clear()
clear
in interface org.eclipse.jface.text.source.ICharacterPairMatcher
public void dispose()
dispose
in interface org.eclipse.jface.text.source.ICharacterPairMatcher
public int getAnchor()
getAnchor
in interface org.eclipse.jface.text.source.ICharacterPairMatcher
public org.eclipse.jface.text.IRegion match(org.eclipse.jface.text.IDocument doc, int offset)
match
in interface org.eclipse.jface.text.source.ICharacterPairMatcher
public SQLEditor getSQLEditor()
public void setSQLEditor(SQLEditor editor)
public abstract java.lang.String getOriginalToken(java.lang.String text, int offset)
text
- is the document text.offset
- is the selected position.
public abstract int getOriginalTokenLength()
public abstract int getMatchingTokenLength()
int
represents the matching token length.public abstract int getOriginalTokenEndOffset(java.lang.String text, int offset)
text
- is the document text.offset
- is the selected position.
int
which is end offset of selected token.public abstract int getMatchingTokenStartOffset(java.lang.String token, int start, boolean forward, java.lang.String text)
token
- is a String
represents the selected token.start
- is the selected token end offset.forward
- represents searching forward or back ward.text
- is the document text.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |