* @param mode
* @return a re-useable or new config or <code>null</code> if none
*/
private ILaunchConfiguration findLaunchConfiguration(IFile bin,
String mode) {
ILaunchConfiguration configuration = null;
List candidateConfigs = Collections.EMPTY_LIST;
try {
ILaunchConfiguration[] configs = DebugPlugin.getDefault()
.getLaunchManager().getLaunchConfigurations();
candidateConfigs = new ArrayList(configs.length);
for (int i = 0; i < configs.length; i++) {
ILaunchConfiguration config = configs[i];
String projectName = config.getAttribute(
PerlLaunchConfigurationConstants.ATTR_PROJECT_NAME,
(String) null);
String programFile = config.getAttribute(
PerlLaunchConfigurationConstants.ATTR_STARTUP_FILE,
(String) null);
String name = bin.getName();
if (programFile != null && programFile.equals(name)) {
if (projectName != null