[jbosstools-commits] JBoss Tools SVN: r44094 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 27 10:32:09 EDT 2012


Author: adietish
Date: 2012-09-27 10:32:08 -0400 (Thu, 27 Sep 2012)
New Revision: 44094

Modified:
   trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/DataBindingUtils.java
Log:
added DataBindingUtils#observeAndPrintValidationState to ease tracking of validation related bugs

Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/DataBindingUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/DataBindingUtils.java	2012-09-27 14:30:25 UTC (rev 44093)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/DataBindingUtils.java	2012-09-27 14:32:08 UTC (rev 44094)
@@ -23,6 +23,7 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
 import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Control;
@@ -155,4 +156,15 @@
 		});
 	}
 
+	/**
+	 * Observe and print validation state changes. Utility method to ease bug
+	 * tracking in wizards.
+	 * 
+	 * @param label the label to use when printing validation state changes 
+	 * @param dbc the databinding context to observe for validation changes
+	 * @param wizardPage the wizard page whose databinding context shall get observed
+	 */
+	public static void observeAndPrintValidationState(IWizardPage wizardPage, DataBindingContext dbc) {
+		observeAndPrintValidationState(wizardPage.getName(), dbc);
+	}
 }



More information about the jbosstools-commits mailing list