don't create search pattern for anonymos functions
diff --git a/core/plugins/org.eclipse.dltk.core/search/org/eclipse/dltk/core/search/SearchPattern.java b/core/plugins/org.eclipse.dltk.core/search/org/eclipse/dltk/core/search/SearchPattern.java
index 26038ab..a99d354 100644
--- a/core/plugins/org.eclipse.dltk.core/search/org/eclipse/dltk/core/search/SearchPattern.java
+++ b/core/plugins/org.eclipse.dltk.core/search/org/eclipse/dltk/core/search/SearchPattern.java
@@ -1051,6 +1051,11 @@
 				}
 			}
 			char[] selector = method.getElementName().toCharArray();
+			if (selector.length == 0) {
+				// TODO introduce pattern for anonymous functions? (similar to
+				// local variables)
+				return null;
+			}
 			// Create method/constructor pattern
 			boolean findMethodDeclarations = true;
 			boolean findMethodReferences = true;