Author: akazakov
Date: 2008-07-23 04:28:08 -0400 (Wed, 23 Jul 2008)
New Revision: 9226
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelValidatorDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2557
https://jira.jboss.org/jira/browse/JBIDE-1111
Used syncExec instead of asyncExec. It's needed for JUnitTest for JBIDE-1111.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelValidatorDelegate.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelValidatorDelegate.java 2008-07-22
19:58:03 UTC (rev 9225)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/DataModelValidatorDelegate.java 2008-07-23
08:28:08 UTC (rev 9226)
@@ -73,7 +73,11 @@
*
*/
public void propertyChanged(DataModelEvent event) {
- validateUntillError();
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ validateUntillError();
+ }
+ });
}
/**
@@ -81,11 +85,7 @@
*/
public void validateUntillError() {
page.setErrorMessage(getFirstValidationError());
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- page.setPageComplete(page.getErrorMessage()==null);
- }
- });
+ page.setPageComplete(page.getErrorMessage()==null);
if(page.getErrorMessage()==null) page.setMessage(null);
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-07-22
19:58:03 UTC (rev 9225)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-07-23
08:28:08 UTC (rev 9226)
@@ -31,6 +31,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import
org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import
org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
@@ -447,9 +448,13 @@
}
private void validate() {
- String message = validatorDelegate.getFirstValidationError();
- this.setPageComplete(message == null);
- this.setErrorMessage(message);
+ final String message = validatorDelegate.getFirstValidationError();
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ setPageComplete(message == null);
+ setErrorMessage(message);
+ }
+ });
}
public class PackageNameValidator implements IValidator {