boolean (Object element, String pattern) { Object userObject = ((DefaultMutableTreeNode)((TreePath)element).getLastPathComponent()).getUserObject(); if (userObject instanceof PsiDirectoryNode) { String str = getElementText(element); if (str == null) return false; if (pattern.indexOf('.') >= 0) { return compare(str, pattern); } StringTokenizer tokenizer = new StringTokenizer(str, "."); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); if (compare(token, pattern)) { return true; } } return false; } else { return super.isMatchingElement(element, pattern); } }