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
IDEWorkbenchMessages.getString("CleanDialog.title"), null, getQuestion(), QUESTION, new String[] { 
                IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
        this.window = window;
        this.selection = selection;
        if (this.selection == null)
            this.selection = new Object[0];
    }
    /*
     * (non-Javadoc)
     * 
     * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
     */
    protected void buttonPressed(int buttonId) {
        final boolean cleanAll = allButton.getSelection();
        final boolean buildAll = buildNowButton != null
                && buildNowButton.getSelection();
        super.buttonPressed(buttonId);
        if (buttonId != IDialogConstants.OK_ID)
        	return;
        
    	WorkspaceJob cleanJob = new WorkspaceJob(IDEWorkbenchMessages.getString("CleanDialog.taskName")) { 
			public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
                doClean(cleanAll, monitor);
                
                if (buildAll) {
                    
                    GlobalBuildAction build = new GlobalBuildAction(window,
                            IncrementalProjectBuilder.INCREMENTAL_BUILD);
                    build.run();
                }