if (!source.getText().trim().equals("")) {
Pattern pattern = Pattern.compile(source.getText().trim(), Pattern.CASE_INSENSITIVE);
Iterator it = getProjectController().getProject().treeNodes();
while(it.hasNext()) {
ProjectPath path = (ProjectPath) it.next();
Object o = path.getObject();
if ((o instanceof ObjEntity || o instanceof DbEntity) && matchFound(((Entity) o).getName(), pattern))
paths.add(path.getPath());
else if (o instanceof Attribute && matchFound(((Attribute) o).getName(), pattern))
paths.add(path.getPath());
else if (o instanceof Relationship && matchFound(((Relationship) o).getName(), pattern))
paths.add(path.getPath());
else if (o instanceof Query && matchFound(((Query) o).getName(), pattern))
paths.add(path.getPath());
else if (o instanceof Embeddable && matchFound(((Embeddable) o).getClassName(), pattern))
paths.add(path.getPath());
else if (o instanceof EmbeddableAttribute && matchFound(((EmbeddableAttribute) o).getName(), pattern))
paths.add(path.getPath());
}
}
if(paths.size()==0){
source.setBackground(Color.pink);