if (fPatternData instanceof ElementQuerySpecification) { IJavaElement element= ((ElementQuerySpecification)fPatternData).getElement(); if (fPatternData.getLimitTo() == IJavaSearchConstants.REFERENCES && element.getElementType() == IJavaElement.METHOD) desc= PrettySignature.getUnqualifiedMethodSignature((IMethod)element); else desc= element.getElementName(); if ("".equals(desc) && element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) desc= SearchMessages.getString("JavaSearchOperation.default_package"); } else { desc= ((PatternQuerySpecification)fPatternData).getPattern(); }
desc= getSearchPattern();
	String getSingularLabel() {		String desc= null;		if (fPatternData instanceof ElementQuerySpecification) {			IJavaElement element= ((ElementQuerySpecification)fPatternData).getElement();			if (fPatternData.getLimitTo() == IJavaSearchConstants.REFERENCES			&& element.getElementType() == IJavaElement.METHOD)				desc= PrettySignature.getUnqualifiedMethodSignature((IMethod)element);			else				desc= element.getElementName();			if ("".equals(desc) && element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) //$NON-NLS-1$				desc= SearchMessages.getString("JavaSearchOperation.default_package"); //$NON-NLS-1$		} else {			desc= ((PatternQuerySpecification)fPatternData).getPattern();		}		desc= quote(desc);		desc= "\""+desc+"\""; //$NON-NLS-1$ //$NON-NLS-2$		String[] args= new String[] {desc, fPatternData.getScopeDescription()}; //$NON-NLS-1$		switch (fPatternData.getLimitTo()) {			case IJavaSearchConstants.IMPLEMENTORS:				return SearchMessages.getFormattedString("JavaSearchOperation.singularImplementorsPostfix", args); //$NON-NLS-1$			case IJavaSearchConstants.DECLARATIONS:				return SearchMessages.getFormattedString("JavaSearchOperation.singularDeclarationsPostfix", args); //$NON-NLS-1$			case IJavaSearchConstants.REFERENCES:				return SearchMessages.getFormattedString("JavaSearchOperation.singularReferencesPostfix", args); //$NON-NLS-1$			case IJavaSearchConstants.ALL_OCCURRENCES:				return SearchMessages.getFormattedString("JavaSearchOperation.singularOccurrencesPostfix", args); //$NON-NLS-1$			case IJavaSearchConstants.READ_ACCESSES:				return SearchMessages.getFormattedString("JavaSearchOperation.singularReadReferencesPostfix", args); //$NON-NLS-1$			case IJavaSearchConstants.WRITE_ACCESSES:				return SearchMessages.getFormattedString("JavaSearchOperation.singularWriteReferencesPostfix", args); //$NON-NLS-1$			default:				return SearchMessages.getFormattedString("JavaSearchOperation.singularOccurrencesPostfix", args); //$NON-NLS-1$;		}	}