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
return;
			} catch (InvocationTargetException e) {
				JUnitPlugin.log(e);
				return;
			}
			IType type= null;
			if (types.length == 0) {
				MessageDialog.openInformation(getShell(), JUnitMessages.getString("LaunchTestAction.dialog.title"), JUnitMessages.getString("LaunchTestAction.message.notests")); 
			} else if (types.length > 1) {
				type= chooseType(types, mode);
			} else {
				type= types[0];
			}
			if (type != null) {
				launch(type, mode);
			}
		}
	}
	private IType[] findLaunchTypes(Object[] search) throws InvocationTargetException, InterruptedException {
		return TestSearchEngine.findTests(new ProgressMonitorDialog(getShell()), search);
	}
	
	/**
	 * @see ILaunchShortcut#launch(IEditorPart, String)
	 */
	public void launch(IEditorPart editor, String mode) {
		IEditorInput input = editor.getEditorInput();
		IJavaElement je = (IJavaElement) input.getAdapter(IJavaElement.class);
		if (je != null) {
			searchAndLaunch(new Object[] {je}, mode);