Bug 44285 Search does not like anonymous types [search]
20031007 smoke 1. Open AboutDialog.java 2. In the editor select the method 'actionPerformed' from the anonymous ActionListener. 3. Press CTRL + H 4. The search dialog shows: junit.awtui.AboutDialog.1..actionPerformed(ActionEvent) Looks weird.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/PrettySignature.java
public static String getSignature(IJavaElement element) {
		if (element == null)
			return null;
		else
			switch (element.getElementType()) {
				case IJavaElement.METHOD:
					return getMethodSignature((IMethod)element);
				case IJavaElement.TYPE:
					return JavaModelUtil.getFullyQualifiedName((IType)element);
				default:
					return element.getElementName();
			}
	}
	
	public static String getMethodSignature(IMethod method) {
		StringBuffer buffer= new StringBuffer();
		buffer.append(JavaModelUtil.getFullyQualifiedName(method.getDeclaringType()));
		boolean isConstructor= method.getElementName().equals(method.getDeclaringType().getElementName());
		if (!isConstructor) {
			buffer.append('.');
		}
		buffer.append(getUnqualifiedMethodSignature(method, !isConstructor));
		
		return buffer.toString();