net.sf.jameleon.bean
Class MatchingTextHelper
java.lang.Object
net.sf.jameleon.bean.MatchingTextHelper
public class MatchingTextHelper
- extends Object
This class is used to be a generic regex text matcher helper to be used in
plug-ins wanting the regex (and maybe later the xpath) functionality to match
the given expression and set the matching text in the provided context variable.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matcher
protected TextMatcher matcher
MatchingTextHelper
public MatchingTextHelper(TextMatcher matcher)
- Creates a MatchingTextHelper with a TextMatcher that is used for the following.
- get the current screen as text.
- Get the matching regular expression.
- Set the variable in the context.
You should find the last two are methods that are already implemented in the FunctionTag.
- Parameters:
matcher
- - The interface used to communicate with the plug-in.
setMatchingTextInContext
public void setMatchingTextInContext(String varName,
String regex,
int regexGroup)
- Sets the matching text in the provided context variable.
- Parameters:
varName
- - The context variable nameregex
- - The regular with the grouping representing the text to matchregexGroup
- - The number of the group to match.
Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.