Bug 18159 JUnit and Java App shortcuts overwrite each other
The two shortcuts use the same naming convention for creating configs. If I select VectorTest to run as a Java App, a config is created. If I then run as "Junit" a new config is created with the same name (VectorTest [Junit]), which overwrites/deletes the first one.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "").equals(type.getJavaProject().getElementName())) { 
						candidateConfigs.add(config);
					}
				}
			}
		} catch (CoreException e) {
			JUnitPlugin.log(e);
		}
		
		
		
		
		
		int candidateCount= candidateConfigs.size();
		if (candidateCount < 1) {
			return createConfiguration(type);
		} else if (candidateCount == 1) {
			return (ILaunchConfiguration) candidateConfigs.get(0);
		} else {
			
			
			
			ILaunchConfiguration config= chooseConfiguration(candidateConfigs, mode);
			if (config != null) {
				return config;
			}
		}
		return null;
	}