if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "").equals(type.getFullyQualifiedName())) { if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(type.getJavaProject().getElementName())) { candidateConfigs.add(config); } }
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(projectName)) candidateConfigs.add(config);
	protected ILaunchConfiguration findLaunchConfiguration(IType type, String mode) {		ILaunchConfigurationType configType = getJavaLaunchConfigType();		List candidateConfigs = Collections.EMPTY_LIST;		try {			ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);			candidateConfigs = new ArrayList(configs.length);			for (int i = 0; i < configs.length; i++) {				ILaunchConfiguration config = configs[i];				if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "").equals(type.getFullyQualifiedName())) { //$NON-NLS-1$					if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(type.getJavaProject().getElementName())) { //$NON-NLS-1$						candidateConfigs.add(config);					}				}			}		} catch (CoreException e) {			JDIDebugUIPlugin.log(e);		}				// If there are no existing configs associated with the IType, create one.		// If there is exactly one config associated with the IType, return it.		// Otherwise, if there is more than one config associated with the IType, prompt the		// user to choose one.		int candidateCount = candidateConfigs.size();		if (candidateCount < 1) {			return createConfiguration(type);		} else if (candidateCount == 1) {			return (ILaunchConfiguration) candidateConfigs.get(0);		} else {			// Prompt the user to choose a config.  A null result means the user			// cancelled the dialog, in which case this method returns null,			// since cancelling the dialog should also cancel launching anything.			ILaunchConfiguration config = chooseConfiguration(candidateConfigs, mode);			if (config != null) {				return config;			}		}				return null;	}