Bug 50911 New search: can't search for a search result
I20040128 (5pm) -> New search view turned on The "search" context menu doesn't appear on selections in the search results view. I use this frequently for back-tracing when browsing code. Search for references to a method, and then search for references to the referencing method, etc. Ctrl+Shift+G to search on a selection in the search results view also used to work.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindDeclarationsInHierarchyAction.java
*/
	public FindDeclarationsInHierarchyAction(IWorkbenchSite site) {
		super(site, SearchMessages.getString("Search.FindHierarchyDeclarationsAction.label"), new Class[] {IField.class, IMethod.class, ILocalVariable.class } ); 
		setToolTipText(SearchMessages.getString("Search.FindHierarchyDeclarationsAction.tooltip")); 
		WorkbenchHelp.setHelp(this, IJavaHelpContextIds.FIND_DECLARATIONS_IN_HIERARCHY_ACTION);
	}
	/**
	 * Note: This constructor is for internal use only. Clients should not call this constructor.
	 */
	public FindDeclarationsInHierarchyAction(JavaEditor editor) {
		super(editor, SearchMessages.getString("Search.FindHierarchyDeclarationsAction.label"), new Class[] {IField.class, IMethod.class, ILocalVariable.class} ); 
		setToolTipText(SearchMessages.getString("Search.FindHierarchyDeclarationsAction.tooltip")); 
		WorkbenchHelp.setHelp(this, IJavaHelpContextIds.FIND_DECLARATIONS_IN_HIERARCHY_ACTION);
	}
	
	IJavaSearchScope getScope(IType type) throws JavaModelException {
		if (type != null)
			return SearchEngine.createHierarchyScope(type);
		else
			return super.getScope(type);
	}
	
	String getScopeDescription(IType type) {
		String typeName= ""; 
		if (type != null)
			typeName= type.getElementName();
		return SearchMessages.getFormattedString("HierarchyScope", new String[] {typeName}); 
	}
}