diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/.ratings b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/.ratings index 36f991c1d6e7d665752a7fdb9a002b6fd6d94ba8..bbae83c7cea5386a7a769fd7f72d0995c1f96e5e 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/.ratings +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/.ratings @@ -1,7 +1,7 @@ ActionUtils.java b41f60eef8464224b98b0b62fd30221be4686a4d GREEN ConstraintsUIUtils.java 40a2893754ec8923a84889c7f5ae33873ccc3332 GREEN CopyPasteUtils.java 6c6c090f3c61854ce1a2331a710e23a18eaccd37 GREEN -DataBindingUtils.java f173ef424663c52da0411838ace7d77f7168afd3 YELLOW +DataBindingUtils.java d122b9ae66a4c40b80bebdbbf4d2fc48331499b4 GREEN DragAndDropUtils.java fc8b7667405f329a05ce60428161e4d096d6547c GREEN EObjectSelectionUtils.java 8e74691388cc7e19af23e6eae03460184cf179e5 GREEN KernelUIUtils.java e55b37b07608484a0f172272cf2576fe1341ef39 GREEN diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java index bb83b8a91b23bc9b3f2f0573fd3cc5d9d7e1803f..0818014c193a22d5968435e78590368b95138d5e 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/util/DataBindingUtils.java @@ -15,6 +15,8 @@ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.ui.util; +import static org.eclipse.jface.databinding.swt.SWTObservables.observeText; + import org.conqat.ide.commons.ui.databinding.JFaceObservables; import org.eclipse.core.databinding.Binding; import org.eclipse.core.databinding.DataBindingContext; @@ -24,7 +26,6 @@ import org.eclipse.core.databinding.observable.value.IObservableValue; import org.eclipse.core.databinding.validation.IValidator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.jface.databinding.swt.SWTObservables; import org.eclipse.jface.fieldassist.ControlDecoration; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Control; @@ -129,7 +130,7 @@ public final class DataBindingUtils { // add the "normal" binding to actually update the model bindings[0] = - dbc.bindValue(SWTObservables.observeText(control, SWT.Modify), modelValue, + dbc.bindValue(observeText(control, SWT.Modify), modelValue, textToModelStrategyWithUpdate, modelToTextStrategy); // here it is important to only use POLICY_CONVERT, to not write through @@ -141,7 +142,7 @@ public final class DataBindingUtils { // perform a binding which only serves for validation purposes bindings[1] = - dbc.bindValue(SWTObservables.observeText(control, SWT.Modify), modelValue, + dbc.bindValue(observeText(control, SWT.Modify), modelValue, textToModelStrategyNoUpdate, new UpdateValueStrategy( UpdateValueStrategy.POLICY_NEVER)); @@ -197,7 +198,7 @@ public final class DataBindingUtils { // add the "normal" binding to actually update the model bindings[0] = - dbc.bindValue(SWTObservables.observeText(control, SWT.FocusOut), cellValue, + dbc.bindValue(observeText(control, SWT.FocusOut), cellValue, cellToModelStrategyWithUpdate, modelToCellStrategy); // here it is important to only use POLICY_CONVERT, to not write through @@ -209,7 +210,7 @@ public final class DataBindingUtils { // perform a binding which only serves for validation purposes bindings[1] = - dbc.bindValue(SWTObservables.observeText(control, SWT.Modify), cellValue, + dbc.bindValue(observeText(control, SWT.Modify), cellValue, cellToModelStrategyNoUpdate, new UpdateValueStrategy( UpdateValueStrategy.POLICY_NEVER));