code: private void searchAndLaunch(Object[] scope, String mode,
  			String selectTitle, String emptyMessage)
  	{
  		INode[] types = null;
  
  		try
  		{
  			project = findProject(scope, PlatformUI.getWorkbench().getProgressService());
  
  			ILaunchConfiguration config = findLaunchConfiguration(project.getName(), getConfigurationType());
  			if (config != null)
  			{
  				// config already exists for the project.
  				launch(config, mode);
  				return;
  			}
  
  			types = findTypes(scope, PlatformUI.getWorkbench().getProgressService());
  
  		} catch (InterruptedException e)
  		{
  			return;
  		} catch (CoreException e)
  		{
  			MessageDialog.openError(getShell(), LauncherMessages.VdmLaunchShortcut_0, e.getMessage());
  			return;
  		}
  		INode type = null;
  		if (types == null || types.length == 0)
  		{
  			MessageDialog.openError(getShell(), LauncherMessages.VdmLaunchShortcut_1, emptyMessage);
  		} else if (types.length > 1)
  		{
  			type = chooseType(types, selectTitle);
  		} else
  		{
  			type = types[0];
  		}
  		if (type != null && project != null)
  		{
  			launch(type, mode, project.getName());
  		}
  	}
docs: Resolves a type that can be launched from the given scope and launches in the specified mode.
  
  @param scope
  the java elements to consider for a type that can be launched
  @param mode
  launch mode
  @param selectTitle
  prompting title for choosing a type to launch
  @param emptyMessage
  error message when no types are resolved for launching