Bug 89157 [JUnit] Search for referring tests does nothing in non Java editors
Version: 3.1.0 Build id: I20050322-1757 When you select "Search|Referring Tests..." from any non java editor nothing hapens at all. It should popup the same info dialog that is used when the action run with no java element selected in the java editor. It would be even better if this action could be disabled when it is not applicable.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/GotoReferencedTestAction.java
run((IStructuredSelection)fSelection);
		else if (fSelection instanceof ITextSelection) 
			run((ITextSelection)fSelection);
	}
	
	public void selectionChanged(IAction action, ISelection selection) {
		fSelection= selection;
	}
		
	private Shell getShell() {
		if (fWorkbench != null)
			return fWorkbench.getShell();
		return JUnitPlugin.getActiveWorkbenchShell();
	}
	
	public void dispose() {
	}
	
	public void init(IWorkbenchWindow window) {
		fWorkbench= window;
	}
	
	private JavaEditor getActiveEditor() {
		IEditorPart editor= fWorkbench.getActivePage().getActiveEditor();
		if (editor instanceof JavaEditor)
			return (JavaEditor) editor;
		return null;
	}
}