public boolean select(Viewer viewer, Object parentElement, Object element) {
if (matcher == null) {
return beanActivationHistory.contains(element);
}
if (element instanceof IBean) {
IBean bean = (IBean) element;
if (matcher.match(bean.getElementName())) {
return true;
}
if (matcher.match(bean.getClassName())) {
return true;
}
String[] aliases = bean.getAliases();
if (aliases != null) {
for (String alias : aliases) {
if (matcher.match(alias)) {
return true;
}
}
}
if (isUpperCasePattern) {
if (SearchPattern.camelCaseMatch(filterText, StringUtils.capitalize(bean.getElementName()))) {
return true;
}
String className = bean.getClassName();
if (className != null) {
int i = className.lastIndexOf('.');
if (i > 0 && i < className.length()) {
if (SearchPattern.camelCaseMatch(filterText, 0, filterText.length(), className, i + 1,
className.length())) {