Fixed bug 366439: clean projects dialog can have enabled OK button if no
projects are selected
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
index 872016c..08adea3 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CleanDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -251,10 +251,19 @@
             globalBuildButton.addSelectionListener(buildRadioSelected);
             projectBuildButton.addSelectionListener(buildRadioSelected);
         }
-        projectNames.getTable().setEnabled(selectSelectedButton);
+
         return area;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.IconAndMessageDialog#createContents(org.eclipse.swt.widgets.Composite)
+     */
+    protected Control createContents(Composite parent) {
+    	Control contents= super.createContents(parent);
+    	updateEnablement();
+    	return contents;
+    }
+
     private void createProjectSelectionTable(Composite radioGroup) {
         projectNames = CheckboxTableViewer.newCheckList(radioGroup, SWT.BORDER);
         projectNames.setContentProvider(new WorkbenchContentProvider());