Hi, just've found it:
JLabelFinder has two wrong methods:
/**
* Set the finder into a case independent mode.
* @param ignoreCase true if case should be ignored.
*/
public void setCaseIndependent(final boolean ignoreCase) {
super.setCaseIndependent(ignoreCase);
m_caseIndependent = ignoreCase;
createPatternMatcher(m_text, m_caseIndependent);
}
/**
* Set the label text to be matched.
* @param text Text to be matched.
*/
public final void setText(final String text) {
m_text = text;
createPatternMatcher(m_text, m_caseIndependent);
}
Everywhere should be NOT createPatternMatcher but recreatePatternMatcher
Because createPatternMatcher has a check for m_patternMatcher == null - that's why after constuctor calicn call of setText and setCaseIndependent are useless.
Logged In: YES
user_id=1778112
Originator: YES
Same problem with LabeledComponentFinder
Logged In: YES
user_id=1778112
Originator: YES
Ooops, one more thing:
public LabeledComponentFinder(final String text,
final boolean caseIndependent) {
setText(text); <==========
m_caseIndependent = caseIndependent;
super.createPatternMatcher(text, caseIndependent);
}
SHOULD BE:
public LabeledComponentFinder(final String text,
final boolean caseIndependent) {
m_text = text;
m_caseIndependent = caseIndependent;
super.createPatternMatcher(text, caseIndependent);
}
Logged In: YES
user_id=1778112
Originator: YES
Ooops, one more thing:
public LabeledComponentFinder(final String text,
final boolean caseIndependent) {
setText(text); <==========
m_caseIndependent = caseIndependent;
super.createPatternMatcher(text, caseIndependent);
}
SHOULD BE:
public LabeledComponentFinder(final String text,
final boolean caseIndependent) {
m_text = text;
m_caseIndependent = caseIndependent;
super.createPatternMatcher(text, caseIndependent);
}