fTestText.setText(type.getFullyQualifiedName()); javaProject = type.getJavaProject(); fProjText.setText(javaProject.getElementName());
if (type != null) { fTestText.setText(type.getFullyQualifiedName()); javaProject = type.getJavaProject(); fProjText.setText(javaProject.getElementName()); }
	protected void handleSearchButtonSelected() {		Shell shell = getShell();		IWorkbenchWindow workbenchWindow = JUnitPlugin.getActiveWorkbenchWindow();				IJavaProject javaProject = getJavaProject();				//TO DO should not use the workbenchWindow as the runnable context		SelectionDialog dialog = new TestSelectionDialog(shell, workbenchWindow, javaProject);		dialog.setTitle("Test Selection");		dialog.setMessage("Choose a test case or test suite:");		if (dialog.open() == dialog.CANCEL) {			return;		}				Object[] results = dialog.getResult();		if ((results == null) || (results.length < 1)) {			return;		}				IType type = (IType)results[0];		fTestText.setText(type.getFullyQualifiedName());		javaProject = type.getJavaProject();		fProjText.setText(javaProject.getElementName());	}