	protected void handleSearchButtonSelected() {
		IJavaElement[] scope= null;
		IJavaProject project = getJavaProject();
		if (scope == null) {
			try {
				scope = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
			}
			catch (JavaModelException e) {
				setErrorMessage(e.getMessage());
				return;
			}
		}
		else {
			scope = new IJavaElement[]{project};
		}
		IType[] types = null;
		try {
			types = AppletLaunchConfigurationUtils.findApplets(getLaunchConfigurationDialog(), scope);
		} 
		catch (InterruptedException e) {return;} 
		catch (InvocationTargetException e) {
			setErrorMessage(e.getTargetException().getMessage());
			return;
		}
		SelectionDialog dialog = null;
		try {
			dialog = JavaUI.createTypeDialog(
					getShell(),
					getLaunchConfigurationDialog(),
					SearchEngine.createJavaSearchScope(types),
					IJavaElementSearchConstants.CONSIDER_CLASSES, 
					false,
					"**"); 
		}
		catch (JavaModelException e) {
			setErrorMessage(e.getMessage());
			return;
		}
		dialog.setTitle(LauncherMessages.appletlauncher_maintab_selection_applet_dialog_title); 
 		dialog.setMessage(LauncherMessages.appletlauncher_maintab_selection_applet_dialog_message); 
		if (dialog.open() == Window.CANCEL) {
			return;
		}
		Object[] results= dialog.getResult();	
		IType type= (IType)results[0];
		if (type != null) {
			fMainText.setText(type.getFullyQualifiedName());
			fProjText.setText(type.getJavaProject().getElementName());
		}
	}

	protected void handleSearchButtonSelected() {
		IJavaElement[] scope= null;
		IJavaProject project = getJavaProject();
		if (project == null) {
			try {
				scope = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
			}
			catch (JavaModelException e) {
				setErrorMessage(e.getMessage());
				return;
			}
		}
		else {
			scope = new IJavaElement[]{project};
		}
		IType[] types = null;
		try {
			types = AppletLaunchConfigurationUtils.findApplets(getLaunchConfigurationDialog(), scope);
		} 
		catch (InterruptedException e) {return;} 
		catch (InvocationTargetException e) {
			setErrorMessage(e.getTargetException().getMessage());
			return;
		}
		SelectionDialog dialog = null;
		try {
			dialog = JavaUI.createTypeDialog(
					getShell(),
					getLaunchConfigurationDialog(),
					SearchEngine.createJavaSearchScope(types),
					IJavaElementSearchConstants.CONSIDER_CLASSES, 
					false,
					"**"); 
		}
		catch (JavaModelException e) {
			setErrorMessage(e.getMessage());
			return;
		}
		dialog.setTitle(LauncherMessages.appletlauncher_maintab_selection_applet_dialog_title); 
 		dialog.setMessage(LauncherMessages.appletlauncher_maintab_selection_applet_dialog_message); 
		if (dialog.open() == Window.CANCEL) {
			return;
		}
		Object[] results= dialog.getResult();	
		IType type= (IType)results[0];
		if (type != null) {
			fMainText.setText(type.getFullyQualifiedName());
			fProjText.setText(type.getJavaProject().getElementName());
		}
	}
