Bug 84586 Launch doesn't wait for build if launching while "cleaning" before build
If I launch from the Java perspective while a build is in progress, and then switch to the debug perspective, no dummy launch appears (although the progress view shows a pending launch).
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
if (!(element instanceof IProject))
					return false;
				IProject project = (IProject) element;
				if (!project.isAccessible())
					return false;
				projectHolder[0] = project;
				return BuildUtilities.isEnabled(projectHolder, IncrementalProjectBuilder.CLEAN_BUILD);
			}
		});
    	projectNames.setInput(ResourcesPlugin.getWorkspace().getRoot());
    	GridData data = new GridData(GridData.FILL_BOTH);
    	data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
    	data.heightHint = IDialogConstants.ENTRY_FIELD_WIDTH;
    	projectNames.getTable().setLayoutData(data);
    	projectNames.setCheckedElements(selection);
    	
    	projectNames.getTable().setEnabled(selectedButton.getSelection());
    	projectNames.addCheckStateListener(new ICheckStateListener() {
			public void checkStateChanged(CheckStateChangedEvent event) {
				selection = projectNames.getCheckedElements();
				updateEnablement();
			}
		});
	}
	/**
	 * Performs the actual clean operation.
	 * @param cleanAll if <code>true</true> clean all projects
	 * @param monitor The monitor that the build will report to
	 * @throws CoreException thrown if there is a problem from the
	 * core builder.